Monday 3:15 p.m.–4 p.m.
The Life Cycle of a Python Class
- Audience level:
- Python Internals
And end-to-end look at the life and death of a class and its instance.
In this talk, we'll write a very simple class and walk through everything that happens when we define it, instantiate it, use it, and eventually let it be garbage collected. We will address the topics of metaclasses, `__new__`, descriptors, etc. to understand when and where they can come into play. (This talk does not provide a how-to on these advanced topics, but more of a how-to-debug for code that might be using them.)