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
37
0
Share
Python と私の事情
PYCON mini 広島、で時間調整用に必要かもしれないかと思って作ってたスライドを放出
tsuda.a
December 06, 2015
More Decks by tsuda.a
See All by tsuda.a
マジカルインクリメントと指数表記
tsudaahr
0
240
バックアップしていますか?
tsudaahr
0
140
RDB以前のファイル設計の話でもしようか(ぇ
tsudaahr
0
150
NPUわからん
tsudaahr
0
200
計算量オーダーの話
tsudaahr
1
440
クラウド初学者が抱える不安について
tsudaahr
0
320
キューとは何か
tsudaahr
0
270
等幅は死んだ(ぇ
tsudaahr
0
130
いくら眺めてもエラーの理由がわからないコードについて
tsudaahr
0
210
Other Decks in Programming
See All in Programming
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
470
実用!Hono RPC2026
yodaka
2
240
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Agentic Elixir
whatyouhide
0
350
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
2
530
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
1k
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
TiDBのアーキテクチャから学ぶ分散システム入門 〜MySQL互換のNewSQLは何を解決するのか〜 / tidb-architecture-study
dznbk
1
180
実践CRDT
tamadeveloper
0
580
Don't Prompt Harder, Structure Better
kitasuke
0
770
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
Featured
See All Featured
BBQ
matthewcrist
89
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Tell your own story through comics
letsgokoyo
1
900
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
Making Projects Easy
brettharned
120
6.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Ruling the World: When Life Gets Gamed
codingconduct
0
210
4 Signs Your Business is Dying
shpigford
187
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
150
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
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")
こちらからは以上です ご清聴ありがとうございました