[Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.61,1.62
Barry Warsaw
bwarsaw@users.sourceforge.net
Mon, 26 Feb 2001 19:36:32 -0800
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv18503
Modified Files:
ref3.tex
Log Message:
Updates to describe function attributes.
Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -r1.61 -r1.62
*** ref3.tex 2001/02/22 21:28:04 1.61
--- ref3.tex 2001/02/27 03:36:30 1.62
***************
*** 416,422 ****
the dictionary that holds the function's global variables --- it
defines the global namespace of the module in which the function was
! defined.
! Of these, \member{func_code}, \member{func_defaults} and
! \member{func_doc} (and this \member{__doc__}) may be writable; the
others can never be changed.
Additional information about a function's definition can be
--- 416,425 ----
the dictionary that holds the function's global variables --- it
defines the global namespace of the module in which the function was
! defined; \member{func_dict} or \member{__dict__} contains the
! namespace supporting arbitrary function attributes.
!
! Of these, \member{func_code}, \member{func_defaults},
! \member{func_doc}/\member{__doc__}, and
! \member{func_dict}/\member{__dict__} may be writable; the
others can never be changed.
Additional information about a function's definition can be
***************
*** 427,433 ****
\ttindex{__doc__}
\ttindex{__name__}
\ttindex{func_defaults}
\ttindex{func_code}
! \ttindex{func_globals}}
\indexii{global}{namespace}
--- 430,438 ----
\ttindex{__doc__}
\ttindex{__name__}
+ \ttindex{__dict__}
\ttindex{func_defaults}
\ttindex{func_code}
! \ttindex{func_globals}
! \ttindex{func_dict}}
\indexii{global}{namespace}
***************
*** 449,452 ****
--- 454,460 ----
\ttindex{im_func}
\ttindex{im_self}}
+
+ Methods also support accessing (but not setting) the arbitrary
+ function attributes on the underlying function object.
User-defined method objects are created in two ways: when getting an