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
Respect the Built-in Names
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
HayaoSuzuki
September 08, 2017
Technology
4.9k
0
Share
Respect the Built-in Names
PyCon JP 2017 Day1 Lightning Talk
HayaoSuzuki
September 08, 2017
More Decks by HayaoSuzuki
See All by HayaoSuzuki
Let's implement useless Python objects (revised)
hayaosuzuki
0
25
Tomorrow graphlib, Let us use everybody
hayaosuzuki
1
1.5k
Tasting "Python Distilled"
hayaosuzuki
0
360
Let's implement useless Python objects
hayaosuzuki
0
2k
How to Write Robust Python Code
hayaosuzuki
5
4.6k
Unknown Evolution of the Built-in Function pow
hayaosuzuki
0
1.5k
Python for Everyday
hayaosuzuki
1
2.3k
How to Use In-Memory Streams
hayaosuzuki
1
6.3k
Do you know cmath module?
hayaosuzuki
0
3.3k
Other Decks in Technology
See All in Technology
Data Enabling Team立ち上げました
sansantech
PRO
0
300
新規サービス開発におけるReact Nativeのリアル〜技術選定の裏側と実践的OSS活用〜
grandbig
2
170
MCPゲートウェイ MCPass の設計と実装 エンタープライズで AI を「運用できる」状態にする
mtpooh
1
210
プロダクトを育てるように生成AIによる開発プロセスを育てよう
kakehashi
PRO
1
910
プロダクトを触って語って理解する、チーム横断バグバッシュのすすめ / 20260411 Naoki Takahashi
shift_evolve
PRO
1
250
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
6
1.3k
Claude Teamプランの選定と、できること/できないこと
rfdnxbro
1
1.9k
プロンプトエンジニアリングを超えて:自由と統制のあいだでつくる Platform × Context Engineering
yuriemori
0
140
すごいぞManaged Kubernetes
harukasakihara
1
370
「決め方」の渡し方 / How to hand over the "decision-making process"
pauli
8
1.3k
AgentCore RuntimeからS3 Filesをマウントしてみる
har1101
3
390
自己組織化を試される緑茶ハイを求めて、今日も全力であそんで学ぼう / Self-Organization and Shochu Green Tea
naitosatoshi
0
330
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
720
Marketing to machines
jonoalderson
1
5.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Designing for Timeless Needs
cassininazir
0
190
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
A designer walks into a library…
pauljervisheath
211
24k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
170
[SF Ruby Conf 2025] Rails X
palkan
2
930
Discover your Explorer Soul
emna__ayadi
2
1.1k
Transcript
Respect the Built-in Names Hayao Suzuki PyCon JP 2017 Lightning
Talk at Waseda Univ. September 8, 2017
Who Am I? About Me Name Hayao Suzuki (@CardinalXaro) Blog
http://xaro.hatenablog.jp/ Major Mathematics (Combinatorics, Number Theory) Work Python Programmer at iRidge, Inc. Reviewed Books Effective Python (O’Reilly Japan) ΞϧΰϦζϜΫΠοΫϦϑΝϨϯε ୈ 2 ൛ (O’Reilly Japan) ॳΊͯͷ PHP (O’Reilly Japan) Effective Debugging (O’Reilly Japan) ͢Β͢ΒΘ͔Δ Python ʢᠳӭࣾʣ Python ͱ JavaScript Ͱ͡ΊΔσʔλϏδϡΞϥΠθʔγϣϯ (O’Reilly Japan) 2 / 9
Today’s Theme Respect the Built-in Names 3 / 9
Examples sum is a name of built-in function but... sum
= 0 for i in range(10): sum = sum + i print(sum) sum ͷೖѱ͍จ໌ʂʂ 4 / 9
Examples id is a name of built-in function but... id
= 12345 name = "Ξϧςϥ" print(f"Α͏ͦ͜{name}͞Μ (id={id})") id ͷೖѱ͍จ໌ʂʂ 5 / 9
Examples list is a name of sequence class but... list
= [1, 2, 3, 4, 5] for i in range(len(list)): print(list[i]) list ͷೖѱ͍จ໌ʂʂ 6 / 9
Examples dict is a name of mapping class but... dict
= {"spam": 0, "egg": 1, "bacon":2} for k, v in dict.items(): print("%s: %s" % (k, v)) dict ͷೖѱ͍จ໌ʂʂ 7 / 9
Examples json is a name of built-in module but... import
json import requests response = requests.get("https://examples.com") if response.status_code == 200: json = response.json() print(json.keys()) json ͷೖѱ͍จ໌ʂʂ 8 / 9
Conclusion Respect the built-in names Abuse of names causes a
trouble. If you provide objects with the same name as a built-in value, read builtins module’s documents. 9 / 9