The Fun of Reinvention
summary
Live-coded a tiny contract framework that actually enforces runtime checks: uses Python 3.6 features like f-strings, ordered dicts, function annotations, signature binding and decorators, descriptors to validate attribute sets, and an __init_subclass__ and metaclass prepare trick with ChainMap to auto-register contracts across modules. The demo runs in a terminal presentation script (iTerm2 inline images) and proves the idea works: annotated functions and classes raise clear assertion errors when given bad inputs, showing how modern Python makes this kind of reinvention practical.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:50Python
- 7:43Reinventing
- 9:55Prototypes
- 12:44Dictionaries
- 13:56GCD Function
- 15:25Annotations
- 18:35Inheritance
- 26:25Decorator
- 30:29Descriptor Protocol
- 41:47Dictionary
related talks
01h 25mAdvanced Metaphors in Coding with Python
26mWhatever I Can do to Entertain You in 30 Minutes
02h 17mIntro to Python for Brand New Programmers
31mThe Future of Programming
41mHow to Get People Excited about Functional Programming
39mCoding with dinosaurs
44mKeynote: A Sailor's View of Python And the idea of "Defensive Programming"
58mFrom Zero to Live with Functional JavaScript Applications (Part 2)
