Objects and classes in Python (and JavaScript)
summary
Covers concrete patterns for Python and JavaScript object design with runnable code on USB memory sticks and downloadable examples. Implements a str subclass with line numbers for file iteration, re-creates Python properties by passing four functions and shows the decorator form as property built from functions, demonstrates converting a class into tuple form and back so classes are class-to-tuple unpack/repack constructible, explores decorators that transform or block methods, touches slots and __exit__ usage, and runs live demos that work and are available after the session.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:16Practical exercises start
- 4:47Python properties and attributes
- 7:25Custom string and number behavior
- 8:48Bit arrays for subsets
- 10:26Unpacking class instances
- 11:29Decorators for classes
- 12:33Answering audience questions
- 15:17Python decorators deep dive
- 16:44Class statement alternatives
- 17:27Summary and next steps
related talks
01h 27mObjectionable Content
24mJavaScript classes for the Python Programmer
34mTeaching Object-Oriented Programming with Python
46mOn Being Pythonic
01h 54mSo you want to be a Python expert?
32mEasier Classes: Python Classes Without All the Cruft
02h 46mThe How and Why of Object-oriented Programming in Python
43mPyScript and the magic of Python in the browser
