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
86
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
Inside Stream API
skrb
1
770
Agentic UI
manfredsteyer
PRO
0
190
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
180
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
110
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
300
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
1
120
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
Claspは野良GASの夢をみるか
takter00
0
210
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
500
The agentic SEO stack - context over prompts
schlessera
0
820
Bash Introduction
62gerente
615
220k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Building Adaptive Systems
keathley
44
3.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Believing is Seeing
oripsolob
1
150
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Facilitating Awesome Meetings
lara
57
7k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
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