Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PyCon APAC 2013 LT
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hideo Hattori
September 15, 2013
Programming
87
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PyCon APAC 2013 LT
PEP 8 and autopep8
Hideo Hattori
September 15, 2013
More Decks by Hideo Hattori
See All by Hideo Hattori
gocloc
hhatto
0
570
RustとPython
hhatto
4
2.6k
PHP Kansai 2013 LT
hhatto
0
100
Other Decks in Programming
See All in Programming
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
140
自作OSでスライド発表する
uyuki234
1
3.5k
どこまでゆるくて許されるのか
tk3fftk
0
290
act1-costs.pdf
sumedhbala
0
140
Oxlintのカスタムルールの現況
syumai
6
1.2k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
620
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
330
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
450
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
190
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
160
Featured
See All Featured
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
240
WCS-LA-2024
lcolladotor
0
670
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Facilitating Awesome Meetings
lara
57
7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
Transcript
PEP 8 and autopep8 PyCon APAC 2013 LT / 2013.09.15
Hideo Hattori
whoami C/Python/Zsh My Python Projects , , , ... code
on , @hhatto pgmagick otamapy genzshcomp meow Github Bitbucket
PEP 8 coding conventions for the Python code Nc”úùk1 Õúß
Õc v ”c v göpvz̈v©–− 2013.08.01 •ò&\©¤ http://www.python.org/dev/peps/pep- 0008/
PEP 8 modernisation 1 m¤ß”5ðcv •9¡−l¡ ׳•9¡−l¡ Python1.5.2 •9¡−l¡w£Œ\©–¤ß Python2/3
•9¡−l¡wûl\©¤ß http://hg.python.org/peps/rev/fb24c80e9afb
About autopep8 simple command-line tool automatic formatting for Python Code
require v0.9.4 (2013.09.08) pep8 $ pip install autopep8
For Example invalid PEP 8 code import sys, os n
= True if n != None: print("none") def f(x): return 2 * x
Output Auto-Formatting Code $ autopep8 invalid.py import sys import os
n = True if n != None: print("none") def f(x): return 2 * x
Aggressive $ autopep8 -a invalid.py import sys import os n
= True if n is not None: print("none") def f(x): return 2 * x
Print Diff $ autopep8 -d invalid.py --- original/invalid.py +++ fixed/invalid.py
@@ -1,7 +1,10 @@ -import sys, os +import sys +import os n = True if n != None: print("none") -def f(x): return 2 * x + +def f(x): + return 2 * x
Other Feature ignore/select errors max-line recursive/jobs
ofiØ#”O •PEP 8 ³
⁄¿autopep8 ³³›–Æ–z“\o
https://github.com/hhatto/autopep8
Thank you