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
82
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
99
Other Decks in Programming
See All in Programming
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
0
100
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.6k
t *testing.T は どこからやってくるの?
otakakot
1
830
The Less-Told Story of Socket Timeouts
coe401_
3
800
JOAI2026 1st solution - heron0519 -
heron0519
0
160
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
380
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
210
GitHubCopilotCLIをはじめよう.pdf
htkym
0
300
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
700
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
240
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
130
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
320
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
エンジニアに許された特別な時間の終わり
watany
106
240k
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