module documentation

This module provides some functions and classes to record and report references to live object instances.

If you want live objects for a particular class to be tracked, you only have to subclass from object_ref (instead of object).

About performance: This library has a minimal performance impact when enabled, and no performance penalty at all when disabled (as object_ref becomes just an alias to object in that case).

Class object​_ref Inherit from this class to a keep a record of live instances
Function get​_oldest Get the oldest object for a specific class name
Function iter​_all Iterate over all objects of the same class by its class name
Function print​_live​_refs Print tracked objects
Variable live​_refs Undocumented
Variable ​None​Type Undocumented
Function format​_live​_refs Return a tabular representation of tracked objects
def get_oldest(class_name):
Get the oldest object for a specific class name
def iter_all(class_name):
Iterate over all objects of the same class by its class name
def print_live_refs(*a, **kw):
Print tracked objects
live_refs: DefaultDict[type, WeakKeyDictionary] =

Undocumented

NoneType =

Undocumented

def format_live_refs(ignore=NoneType):
Return a tabular representation of tracked objects