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
Python と私の事情
Search
tsuda.a
December 06, 2015
Programming
38
0
Share
Python と私の事情
PYCON mini 広島、で時間調整用に必要かもしれないかと思って作ってたスライドを放出
tsuda.a
December 06, 2015
More Decks by tsuda.a
See All by tsuda.a
Git を GUI で使う話
tsudaahr
0
70
マジカルインクリメントと指数表記
tsudaahr
0
240
バックアップしていますか?
tsudaahr
0
140
RDB以前のファイル設計の話でもしようか(ぇ
tsudaahr
0
150
NPUわからん
tsudaahr
0
210
計算量オーダーの話
tsudaahr
1
450
クラウド初学者が抱える不安について
tsudaahr
0
320
キューとは何か
tsudaahr
0
280
等幅は死んだ(ぇ
tsudaahr
0
130
Other Decks in Programming
See All in Programming
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
680
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
300
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
230
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
200
AI Agent と正しく分析するための環境作り
yoshyum
2
550
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
440
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
170
cloudnative conference 2026 flyle
azihsoyn
1
200
inferと仲良くなる10分間
ryokatsuse
1
120
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
2
360
tsserverとは何だったのか_これからどうなるのか
nowaki28
1
240
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
My Coaching Mixtape
mlcsv
0
130
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
300
Ruling the World: When Life Gets Gamed
codingconduct
0
230
The Language of Interfaces
destraynor
162
26k
Crafting Experiences
bethany
1
150
Facilitating Awesome Meetings
lara
57
6.9k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
A better future with KSS
kneath
240
18k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Tell your own story through comics
letsgokoyo
1
930
Transcript
Python と私の事情 @tsuda_ahr LTDD #21
準備) Python の実行環境の作り方 (Windows) • Windows はデフォルトでは Python は入っておりませんので。
Python Download で検索
Windows x86-64 embeddable zip file をダウンロードする このあたりまで スクロール
あとは • 適当なところに、ダウンロードした zip を展開。 • zip 展開したフォルダで python と入力すると
CLI が動作する。 • ファイル名指定の場合は、python hoge.py のような感じで。 • アンインストールは当該フォルダを削除すればOK。
本題
1.インデントを強制される処理系は嫌い
例1 a = 10 if 5 < a < 15:
if a < 10: print("a") else : print("b") else: print("c")
正常に実行される C>python test.py b
例2 a = 10 if 5 < a < 15:
if a < 10: print("a") else : print("b") else: print("c")
なぜかエラー C>python test.py File "test.py", line 4 print("a") ^ TabError:
inconsistent use of tabs and spaces in indentation
見た目は同じなんである a = 10 if 5 < a < 15:
if a < 10: print("a") else : print("b") else: print("c") a = 10 if 5 < a < 15: if a < 10: print("a") else : print("b") else: print("c")
比較 a = 10 if 5 < a < 15:
if a < 10: print("a") else : print("b") else: print("c") a = 10 if 5 < a < 15: if a < 10: print("a") else : print("b") else: print("c")
スペースとタブを可視化するとこうなる a = 10 if 5 < a < 15:
▯▯▯▯▯▯▯▯if a < 10: ▯▯▯▯▯▯▯▯▯▯▯▯▯▯▯▯print("a") ▯▯▯▯▯▯▯▯else : ▯▯▯▯▯▯▯▯▯▯▯▯▯▯▯▯print("b") else: > print("c") a = 10 if 5 < a < 15: ▯▯▯▯▯▯▯▯if a < 10: > > print("a") > else : > > print("b") else: > print("c") 凡例 ▯ スペース > タブ
こんなツイートを発見。
次
2.この if 文は面白いけど規格外すぎてちよっと…
なんと他の言語で失敗する、初学者にありがちな構文が正常に通る! a = 10 if 5 < a < 15:
print("a")
すげえ
しかしさすがにこれはダメ(汗 a = 10 if a == 1 or 2:
print("a")
こちらからは以上です ご清聴ありがとうございました