Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PyCon APAC 2013 LT
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hideo Hattori
September 15, 2013
Programming
97
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
590
RustとPython
hhatto
4
2.7k
PHP Kansai 2013 LT
hhatto
0
120
Other Decks in Programming
See All in Programming
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.1k
Event is what happens
moro
2
1.7k
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
150
Performance Optimization With LLMs
xleitix
0
210
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
120
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7k
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
210
R8 の設定見直しでアプリサイズ削減
andpad
0
230
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.1k
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
170
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
110
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
5
5.5M
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
It's Worth the Effort
3n
188
29k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
300
Evolving SEO for Evolving Search Engines
ryanjones
0
330
BBQ
matthewcrist
90
10k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
560
The agentic SEO stack - context over prompts
schlessera
0
980
Product Roadmaps are Hard
iamctodd
55
13k
Writing Fast Ruby
sferik
630
63k
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