Module weakref
[hide private]
[frames] | no frames]

Module weakref

Weak reference support for Python.

This module is an implementation of PEP 205:

http://python.sourceforge.net/peps/pep-0205.html

Classes [hide private]
ref
CallableProxyType
ProxyType
ReferenceType
WeakValueDictionary
Mapping class that references values weakly.
KeyedRef
Specialized reference that includes a key corresponding to the value.
WeakKeyDictionary
Mapping class that references keys weakly.
Functions [hide private]
 
getweakrefcount(object)
return the number of weak references to 'object'.
 
getweakrefs(object)
return a list of all weak reference objects that point to 'object'.
 
proxy(object, callback=...)
create a proxy object that weakly references 'object'.
Variables [hide private]
  ProxyTypes = (<type 'weakproxy'>, <type 'weakcallableproxy'>)

Imports: UserDict, ReferenceError


Function Details [hide private]

proxy(object, callback=...)

 

create a proxy object that weakly references 'object'. 'callback', if given, is called with a reference to the proxy when 'object' is about to be finalized.