Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Private Attributes
weakref.KeyedRef Class Reference
Inheritance diagram for weakref.KeyedRef:
Inheritance graph
[legend]
Collaboration diagram for weakref.KeyedRef:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __new__
def __init__

Public Attributes

 key

Static Private Attributes

string __slots__ = "key"

Detailed Description

Specialized reference that includes a key corresponding to the value.

This is used in the WeakValueDictionary to avoid having to create
a function object for each key stored in the mapping.  A shared
callback object can use the 'key' attribute of a KeyedRef instead
of getting a reference to the key from an enclosing scope.

Definition at line 225 of file weakref.py.


Constructor & Destructor Documentation

def weakref.KeyedRef.__init__ (   self,
  ob,
  callback,
  key 
)

Definition at line 242 of file weakref.py.

00242 
00243     def __init__(self, ob, callback, key):
00244         super().__init__(ob, callback)
00245 

Here is the caller graph for this function:


Member Function Documentation

def weakref.KeyedRef.__new__ (   type,
  ob,
  callback,
  key 
)

Definition at line 237 of file weakref.py.

00237 
00238     def __new__(type, ob, callback, key):
00239         self = ref.__new__(type, ob, callback)
00240         self.key = key
00241         return self


Member Data Documentation

string weakref.KeyedRef.__slots__ = "key" [static, private]

Definition at line 235 of file weakref.py.

Definition at line 239 of file weakref.py.


The documentation for this class was generated from the following file: