Under and Dunder - Python secret functions
summary
Shows how Python reveals hidden methods by uses dir to inspect dunder methods and demonstrates concrete effects for __getitem__, __iter__ and __next__. Explains name mangling and where double‑underscore names go with shows name‑mangling of double underscores. Live builds an example class that becomes iterable and yields squares and even a bogus length so you can see behavior change with builds iterable class that yields squares and a fake __len__ of 999.
AI-written summary · about
chapters (11)
- 0:00Intro
- 1:52Overview
- 5:56Dunder
- 6:54Secret function
- 7:22Sequential object
- 8:12Get items
- 8:33Sequence
- 10:07Link
- 10:28List
- 10:52Link method
- 11:38Iterable
related talks
30mUnder and Dunder - Python secret functions
31mLife Under the A Guide to Python's Internal Conventions
25mThe Magic of Python
25mAdvanced Python
27mUnder the Hood Hacking Python Data Types for Fun and Power
25mLet's implement useless Python objects
28mLoop better: a deeper look at iteration in Python
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
