Introduction
Advanced object oriented programming (OOP)
()
What you should know
()
Using Codespaces
()
1. Attribute Access
Deconstructing attribute access
()
Using properties
()
Programmatic attribute access
()
Reducing memory with __slots__
()
Name mangling
()
Descriptors
()
Challenge: Colors
()
Solution: Colors
()
2. Methods
Using class methods
()
Using static methods
()
Mixin classes
()
Abstract base classes
()
Defining interfaces with typing.Protocol
()
Challenge: Event from JSON
()
Solution: Event from JSON
()
3. Special Methods
String representations
()
Sequences
()
Mappings
()
Numbers
()
Callable
()
Challenge: Database-backed dictionary
()
Solution: Database-backed dictionary
()
4. Metaclasses
What are metaclasses?
()
Class creation
()
Instance creation
()
Attribute lookup
()
Challenge: Singleton
()
Solution: Singleton
()
5. Class Creation Utilities
Class decorators
()
namedtuple()
()
dataclass()
()
Freezing
()
Challenge: VM class
()
Solution: VM class
()