Objects and classes in Python (and JavaScript)
summary
Hands-on recipes for actual problems: reading files while keeping the original string but attaching filename and line number by subclassing str for labeled lines; creating properties by turning a small class into a property factory with property_from_class decorator; making named integers that print as words while behaving like ints; compact bitset-like subsets stored as raw integers; converting class data to tuples and back; using class decorators to avoid complex metaclasses; a brief demo showing JavaScript objects behave like Python classes. Training materials are on USB and updated.
AI-written summary · about
chapters (6)
related talks
34mTeaching Object-Oriented Programming with Python
24mJavaScript classes for the Python Programmer
32mEasier Classes: Python Classes Without All the Cruft
01h 27mObjectionable Content
22mLearning Parseltongue: Wizardry in Python
38mUnderstanding attributes (Or: They're not nearly as boring as you think!)
25mThe Magic of Python
02h 46mThe How and Why of Object-oriented Programming in Python
