Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
0
77
PyCon APAC 2013 LT
PEP 8 and autopep8
Hideo Hattori
September 15, 2013
Tweet
Share
More Decks by Hideo Hattori
See All by Hideo Hattori
gocloc
hhatto
0
550
RustとPython
hhatto
4
2.5k
PHP Kansai 2013 LT
hhatto
0
94
Other Decks in Programming
See All in Programming
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
270
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
クラウドに依存しないS3を使った開発術
simesaba80
0
150
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
AIコーディングエージェント(Gemini)
kondai24
0
270
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
390
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
570
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
3
660
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
3
1k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
400
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
92
Product Roadmaps are Hard
iamctodd
PRO
55
12k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
32
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
My Coaching Mixtape
mlcsv
0
13
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Claude Code のすすめ
schroneko
65
200k
Darren the Foodie - Storyboard
khoart
PRO
0
1.9k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Paper Plane (Part 1)
katiecoart
PRO
0
1.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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