~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/library/weakref.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
:mod:`weakref` --- Weak references
3
2
==================================
4
3
 
65
64
.. versionchanged:: 2.4
66
65
   Added support for files, sockets, arrays, and patterns.
67
66
 
68
 
Several builtin types such as :class:`list` and :class:`dict` do not directly
 
67
Several built-in types such as :class:`list` and :class:`dict` do not directly
69
68
support weak references but can add support through subclassing::
70
69
 
71
70
   class Dict(dict):
73
72
 
74
73
   obj = Dict(red=1, green=2, blue=3)   # this object is weak referenceable
75
74
 
 
75
.. impl-detail::
 
76
 
 
77
   Other built-in types such as :class:`tuple` and :class:`long` do not support
 
78
   weak references even when subclassed.
 
79
 
76
80
Extension types can easily be made to support weak references; see
77
81
:ref:`weakref-support`.
78
82