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
Hideo Hattori
September 15, 2013
Programming
81
0
Share
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
560
RustとPython
hhatto
4
2.6k
PHP Kansai 2013 LT
hhatto
0
98
Other Decks in Programming
See All in Programming
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
270
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
180
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
140
ファインチューニングせずメインコンペを解く方法
pokutuna
0
270
Coding as Prompting Since 2025
ragingwind
0
750
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
210
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
340
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
20260315 AWSなんもわからん🥲
chiilog
2
190
AI活用のコスパを最大化する方法
ochtum
0
370
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
2
250
Running Swift without an OS
kishikawakatsumi
0
220
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Typedesign – Prime Four
hannesfritz
42
3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Balancing Empowerment & Direction
lara
5
1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
870
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The Invisible Side of Design
smashingmag
302
51k
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