PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Monday 3:15 p.m.–4 p.m.

The Life Cycle of a Python Class

Mike Graham

Audience level:
Experienced
Category:
Python Internals

Description

And end-to-end look at the life and death of a class and its instance.

Abstract

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.)