weakref

Weak reference support for Python.

This module is an implementation of PEP 205:

http://www.python.org/dev/peps/pep-0205/

Functions

getweakrefcount getweakrefcount(object) – return the number of weak references
getweakrefs getweakrefs(object) – return a list of all weak reference objects
proxy proxy(object[, callback]) – create a proxy object that weakly

Classes

CallableProxyType alias of weakcallableproxy
KeyedRef(ob, callback, key) Specialized reference that includes a key corresponding to the value.
ProxyType alias of weakproxy
ReferenceType alias of weakref
WeakKeyDictionary([dict]) Mapping class that references keys weakly.
WeakSet([data])
WeakValueDictionary(*args, **kw) Mapping class that references values weakly.
ref alias of weakref

Exceptions

ReferenceError Weak ref proxy used after referent went away.