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
0
68
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
520
RustとPython
hhatto
4
2.4k
PHP Kansai 2013 LT
hhatto
0
85
Other Decks in Programming
See All in Programming
remix + cloudflare workers (DO) docker上でいい感じに開発する
yoshidatomoaki
0
130
Agentic Applications with Symfony
el_stoffel
2
270
エンジニア未経験が最短で戦力になるためのTips
gokana
0
260
趣味全開のAITuber開発
kokushin
0
190
ミリしらMCP勉強会
watany
4
740
S3静的ホスティング+Next.js静的エクスポート で格安webアプリ構築
iharuoru
0
220
MCP調べてみました! / Exploring MCP
uhzz
2
2.2k
Vibe Codingをせずに Clineを使っている
watany
17
6k
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Webinar 2025
danielsogl
0
120
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
2.9k
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
180
State of Namespace
tagomoris
4
630
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Designing for Performance
lara
607
69k
Java REST API Framework Comparison - PWX 2021
mraible
30
8.5k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
YesSQL, Process and Tooling at Scale
rocio
172
14k
A Tale of Four Properties
chriscoyier
158
23k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
104
19k
Building Applications with DynamoDB
mza
94
6.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Being A Developer After 40
akosma
91
590k
A better future with KSS
kneath
239
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