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
Python と私の事情
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
tsuda.a
December 06, 2015
Programming
44
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Python と私の事情
PYCON mini 広島、で時間調整用に必要かもしれないかと思って作ってたスライドを放出
tsuda.a
December 06, 2015
More Decks by tsuda.a
See All by tsuda.a
Git を GUI で使う話
tsudaahr
0
130
マジカルインクリメントと指数表記
tsudaahr
0
290
バックアップしていますか?
tsudaahr
0
170
RDB以前のファイル設計の話でもしようか(ぇ
tsudaahr
0
180
NPUわからん
tsudaahr
0
230
計算量オーダーの話
tsudaahr
1
480
クラウド初学者が抱える不安について
tsudaahr
0
470
キューとは何か
tsudaahr
0
310
等幅は死んだ(ぇ
tsudaahr
0
150
Other Decks in Programming
See All in Programming
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
330
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
220
JRuby: Past, Present, and Future
headius
0
190
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
570
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
380
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
390
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
130
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
200
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
770
setup-vp GitLab対応の裏側
naokihaba
0
120
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Building Applications with DynamoDB
mza
96
7.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
First, design no harm
axbom
PRO
2
1.3k
Odyssey Design
rkendrick25
PRO
2
810
Thoughts on Productivity
jonyablonski
76
5.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Google's AI Overviews - The New Search
badams
0
1.6k
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")
こちらからは以上です ご清聴ありがとうございました