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
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
48
Tomorrow graphlib, Let us use everybody
hayaosuzuki
1
1.7k
Tasting "Python Distilled"
hayaosuzuki
0
380
Let's implement useless Python objects
hayaosuzuki
0
2k
How to Write Robust Python Code
hayaosuzuki
5
4.7k
Unknown Evolution of the Built-in Function pow
hayaosuzuki
0
1.5k
Python for Everyday
hayaosuzuki
1
2.4k
How to Use In-Memory Streams
hayaosuzuki
1
6.4k
Do you know cmath module?
hayaosuzuki
0
3.3k
Other Decks in Technology
See All in Technology
開発を止めない CI/CD ~CI Visibilityによる継続的最適化~
pensuke628
0
220
AIガバナンス実践 - 生成AIコネクタのデータ漏洩リスクと実務対策
knishioka
0
150
Dynamic Workersについて
yusukebe
2
530
Javaで学ぶSOLID原則
negima
1
240
大規模災害時でも高い信頼性を維持するアプリケーション基盤の実現/nikkei-tech-talk46
nikkei_engineer_recruiting
0
120
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
190
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
130
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
140
組織の中で自分を経営する技術
shoota
0
230
Oracle Cloud Infrastructure:2026年5月度サービス・アップデート
oracle4engineer
PRO
1
280
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
310
サプライチェーンセキュリティの空白地帯 - 信頼できる”依存性”の未来を考える
rung
PRO
2
540
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
Writing Fast Ruby
sferik
630
63k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
370
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Building Adaptive Systems
keathley
44
3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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