Lines Matching refs:references
1 :mod:`weakref` --- Weak references
5 :synopsis: Support for weak references and weak dictionaries.
17 references` to objects.
26 only remaining references to a referent are weak references,
29 reference may return the object even if there are no strong references to it.
31 A primary use for weak references is to implement caches or
40 the :mod:`weakref` module are an alternative, using weak references to construct
43 :class:`WeakValueDictionary`, then when the last remaining references to that
44 image object are the weak references held by weak mappings, garbage collection
48 :class:`WeakKeyDictionary` and :class:`WeakValueDictionary` use weak references
49 in their implementation, setting up callback functions on the weak references
52 but keeps weak references to its elements, just like a
63 create your own weak references directly. The low-level machinery is
76 support weak references but can add support through subclassing::
86 references even when subclassed.
88 Extension types can easily be made to support weak references; see
106 It is allowable for many weak references to be constructed for the same object.
114 Weak references are :term:`hashable` if the *object* is hashable. They will
119 Weak references support tests for equality, but not ordering. If the referents
120 are still alive, two references have the same equality relationship as their
122 the references are equal only if the reference objects are the same object.
154 Return the number of weak references and proxies which refer to *object*.
164 Mapping class that references keys weakly. Entries in the dictionary will be
174 exposes the internal references directly. The references are not guaranteed to
175 be "live" at the time they are used, so the result of calling the references
177 references that will cause the garbage collector to keep the keys around longer
183 Return an iterable of the weak references to the keys.
188 Mapping class that references values weakly. Entries in the dictionary will be
201 Return an iterable of the weak references to the values.
206 Set class that keeps weak references to its elements. An element will be
295 not own any references to *obj*, either directly or indirectly,
304 The type object for weak references objects.
534 A more robust alternative can be to define a finalizer which only references