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
Collaboration diagram for weakref.KeyedRef:
Collaboration graph

List of all members.

Public Member Functions

def __new__
def __init__

Public Attributes


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

Constructor & Destructor Documentation

def weakref.KeyedRef.__init__ (   self,

Definition at line 242 of file

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

Here is the caller graph for this function:

Member Function Documentation

def weakref.KeyedRef.__new__ (   type,

Definition at line 237 of file

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

Definition at line 239 of file

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