[Python-checkins] python/dist/src/Doc/lib libweakref.tex,1.24,1.25

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun May 30 23:09:28 EDT 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432/Doc/lib

Modified Files:
	libweakref.tex 
Log Message:
Add weakref support to sockets and re pattern objects.



Index: libweakref.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** libweakref.tex	3 Feb 2004 20:55:15 -0000	1.24
--- libweakref.tex	31 May 2004 03:09:25 -0000	1.25
***************
*** 49,55 ****
  Not all objects can be weakly referenced; those objects which can
  include class instances, functions written in Python (but not in C),
! and methods (both bound and unbound).  Extension types can easily
! be made to support weak references; see section \ref{weakref-extension},
! ``Weak References in Extension Types,'' for more information.
  
  
--- 49,69 ----
  Not all objects can be weakly referenced; those objects which can
  include class instances, functions written in Python (but not in C),
! methods (both bound and unbound), sets, frozensets, file objects,
! sockets, arrays, deques, and regular expression pattern objects.
! \versionchanged[Added support for files, sockets, arrays, and patterns]{2.4}
! 
! Several builtin types such as \class{list} and \class{dict} do not
! directly support weak references but can add support through subclassing:
! 
! \begin{verbatim}
! class Dict(dict):
!     pass
! 
! obj = Dict(red=1, green=2, blue=3)   # this object is weak referencable
! \end{verbatim}
! 
! Extension types can easily be made to support weak references; see section
! \ref{weakref-extension}, ``Weak References in Extension Types,'' for more
! information.
  
  




More information about the Python-checkins mailing list