• Home
  • Raw
  • Download

Lines Matching refs:references

1 :mod:`weakref` --- Weak references
5 :synopsis: Support for weak references and weak dictionaries.
19 references` to objects.
28 only remaining references to a referent are weak references,
30 for something else. A primary use for weak references is to implement caches or
39 the :mod:`weakref` module are an alternative, using weak references to construct
42 :class:`WeakValueDictionary`, then when the last remaining references to that
43 image object are the weak references held by weak mappings, garbage collection
47 :class:`WeakKeyDictionary` and :class:`WeakValueDictionary` use weak references
48 in their implementation, setting up callback functions on the weak references
52 own weak references directly. The low-level machinery used by the weak
69 support weak references but can add support through subclassing::
79 weak references even when subclassed.
81 Extension types can easily be made to support weak references; see
95 It is allowable for many weak references to be constructed for the same object.
103 Weak references are :term:`hashable` if the *object* is hashable. They will maintain
108 Weak references support tests for equality, but not ordering. If the referents
109 are still alive, two references have the same equality relationship as their
111 the references are equal only if the reference objects are the same object.
132 Return the number of weak references and proxies which refer to *object*.
142 Mapping class that references keys weakly. Entries in the dictionary will be
157 expose the internal references directly. The references are not guaranteed to
158 be "live" at the time they are used, so the result of calling the references
160 references that will cause the garbage collector to keep the keys around longer
166 Return an iterable of the weak references to the keys.
173 Return a list of weak references to the keys.
180 Mapping class that references values weakly. Entries in the dictionary will be
198 Return an iterable of the weak references to the values.
205 Return a list of weak references to the values.
212 Set class that keeps weak references to its elements. An element will be
220 The type object for weak references objects.