[Python-checkins] python/dist/src/Doc/api newtypes.tex,1.20,1.21

mwh@users.sourceforge.net mwh@users.sourceforge.net
Mon, 10 Feb 2003 11:18:25 -0800


Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1:/tmp/cvs-serv11461

Modified Files:
	newtypes.tex 
Log Message:
Update advice about __module__ and __name__ and tp_name wrt. new types.

Add \refs to GC section that were XXXed out.


Index: newtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/newtypes.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** newtypes.tex	6 Feb 2003 18:37:11 -0000	1.20
--- newtypes.tex	10 Feb 2003 19:18:21 -0000	1.21
***************
*** 425,439 ****
    should have the \member{tp_name} initializer \code{"P.Q.M.T"}.
  
!   For dynamically allocated type objects, this may be just the type
!   name, if the module name is explicitly stored in the type dict as
!   the value for key \code{'__module__'}.
  
!   If the tp_name field contains a dot, everything before the last dot
!   is made accessible as the \member{__module__} attribute, and
!   everything after the last dot is made accessible as the
!   \member{__name__} attribute.  If no dot is present, the entire
!   \member{tp_name} field is made accessible as the \member{__name__}
!   attribute, and the \member{__module__} attribute is undefined
!   (unless explicitly set in the dictionary, as explained above).
  
    This field is not inherited by subtypes.
--- 425,442 ----
    should have the \member{tp_name} initializer \code{"P.Q.M.T"}.
  
!   For dynamically allocated type objects, this should just be the type
!   name, and the module name explicitly stored in the type dict as the
!   value for key \code{'__module__'}.
  
!   For statically allocated type objects, the tp_name field should
!   contain a dot.  Everything before the last dot is made accessible as
!   the \member{__module__} attribute, and everything after the last dot
!   is made accessible as the \member{__name__} attribute.
! 
!   If no dot is present, the entire \member{tp_name} field is made
!   accessible as the \member{__name__} attribute, and the
!   \member{__module__} attribute is undefined (unless explicitly set in
!   the dictionary, as explained above).  This means your type will be
!   impossible to pickle.
  
    This field is not inherited by subtypes.
***************
*** 883,888 ****
    An optional pointer to a traversal function for the garbage
    collector.  This is only used if the \constant{Py_TPFLAGS_HAVE_GC}
!   flag bit is set.  More information in section XXX about garbage
!   collection.
  
    This field is inherited by subtypes together with \member{tp_clear}
--- 886,891 ----
    An optional pointer to a traversal function for the garbage
    collector.  This is only used if the \constant{Py_TPFLAGS_HAVE_GC}
!   flag bit is set.  More information in section
!   \ref{supporting-cycle-detection} about garbage collection.
  
    This field is inherited by subtypes together with \member{tp_clear}
***************
*** 896,900 ****
    An optional pointer to a clear function for the garbage collector.
    This is only used if the \constant{Py_TPFLAGS_HAVE_GC} flag bit is
!   set.  More information in section XXX about garbage collection.
  
    This field is inherited by subtypes together with \member{tp_clear}
--- 899,904 ----
    An optional pointer to a clear function for the garbage collector.
    This is only used if the \constant{Py_TPFLAGS_HAVE_GC} flag bit is
!   set.  More information in section
!   \ref{supporting-cycle-detection} about garbage collection.
  
    This field is inherited by subtypes together with \member{tp_clear}