Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/weakref.rst

    r2 r391  
    1111
    1212.. versionadded:: 2.1
     13
     14**Source code:** :source:`Lib/weakref.py`
     15
     16--------------
    1317
    1418The :mod:`weakref` module allows the Python programmer to create :dfn:`weak
     
    5054benefit of advanced uses.
    5155
    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 the
    56    object still alive.
    57 
    5856Not all objects can be weakly referenced; those objects which can include class
    5957instances, functions written in Python (but not in C), methods (both bound and
    6058unbound), sets, frozensets, file objects, :term:`generator`\s, type objects,
    6159:class:`DBcursor` objects from the :mod:`bsddb` module, sockets, arrays, deques,
    62 and regular expression pattern objects.
     60regular expression pattern objects, and code objects.
    6361
    6462.. versionchanged:: 2.4
    6563   Added support for files, sockets, arrays, and patterns.
     64
     65.. versionchanged:: 2.7
     66   Added support for thread.lock, threading.Lock, and code objects.
    6667
    6768Several built-in types such as :class:`list` and :class:`dict` do not directly
     
    205206
    206207   .. 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
    207216
    208217
Note: See TracChangeset for help on using the changeset viewer.