Changeset 391 for python/trunk/Doc/library/weakref.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/weakref.rst
r2 r391 11 11 12 12 .. versionadded:: 2.1 13 14 **Source code:** :source:`Lib/weakref.py` 15 16 -------------- 13 17 14 18 The :mod:`weakref` module allows the Python programmer to create :dfn:`weak … … 50 54 benefit of advanced uses. 51 55 52 .. note::53 54 Weak references to an object are cleared before the object's :meth:`__del__`55 is called, to ensure that the weak reference callback (if any) finds the56 object still alive.57 58 56 Not all objects can be weakly referenced; those objects which can include class 59 57 instances, functions written in Python (but not in C), methods (both bound and 60 58 unbound), sets, frozensets, file objects, :term:`generator`\s, type objects, 61 59 :class:`DBcursor` objects from the :mod:`bsddb` module, sockets, arrays, deques, 62 and regular expression patternobjects.60 regular expression pattern objects, and code objects. 63 61 64 62 .. versionchanged:: 2.4 65 63 Added support for files, sockets, arrays, and patterns. 64 65 .. versionchanged:: 2.7 66 Added support for thread.lock, threading.Lock, and code objects. 66 67 67 68 Several built-in types such as :class:`list` and :class:`dict` do not directly … … 205 206 206 207 .. versionadded:: 2.5 208 209 210 .. class:: WeakSet([elements]) 211 212 Set class that keeps weak references to its elements. An element will be 213 discarded when no strong reference to it exists any more. 214 215 .. versionadded:: 2.7 207 216 208 217
Note:
See TracChangeset
for help on using the changeset viewer.