[Python-checkins] python/dist/src/Doc/ref ref2.tex, 1.34.6.7, 1.34.6.8

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Fri Sep 5 21:48:54 EDT 2003


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

Modified Files:
      Tag: release22-maint
	ref2.tex 
Log Message:
Elaborate the explanation of different flavors of _* identifiers.
Fixes SF bug #520325.


Index: ref2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v
retrieving revision 1.34.6.7
retrieving revision 1.34.6.8
diff -C2 -d -r1.34.6.7 -r1.34.6.8
*** ref2.tex	19 Jan 2003 14:54:08 -0000	1.34.6.7
--- ref2.tex	6 Sep 2003 03:48:52 -0000	1.34.6.8
***************
*** 285,307 ****
  
  Certain classes of identifiers (besides keywords) have special
! meanings.  These are:
  
! \begin{tableiii}{l|l|l}{code}{Form}{Meaning}{Notes}
! \lineiii{_*}{Not imported by \samp{from \var{module} import *}}{(1)}
! \lineiii{__*__}{System-defined name}{}
! \lineiii{__*}{Class-private name mangling}{}
! \end{tableiii}
  
! See sections: \ref{import}, ``The \keyword{import} statement'';
! \ref{specialnames}, ``Special method names'';
! \ref{atom-identifiers}, ``Identifiers (Names)''.
  
! Note:
  
- \begin{description}
- \item[(1)] The special identifier \samp{_} is used in the interactive
- interpreter to store the result of the last evaluation; it is stored
- in the \module{__builtin__} module.  When not in interactive mode,
- \samp{_} has no special meaning and is not defined.
  \end{description}
  
--- 285,321 ----
  
  Certain classes of identifiers (besides keywords) have special
! meanings.  These classes are identified by the patterns of leading and
! trailing underscore characters:
  
! \begin{description}
  
! \item[\code{_*}]
!   Not imported by \samp{from \var{module} import *}.  The special
!   identifier \samp{_} is used in the interactive interpreter to store
!   the result of the last evaluation; it is stored in the
!   \module{__builtin__} module.  When not in interactive mode, \samp{_}
!   has no special meaning and is not defined.
!   See section~\ref{import}, ``The \keyword{import} statement.''
  
!   \note{The name \samp{_} is often used in conjunction with
!   internationalization; refer to the documentation for the
!   \ulink{\module{gettext} module}{../lib/module-gettext.html} for more
!   information on this convention.}
! 
! \item[\code{__*__}]
!   System-defined names.  These names are defined by the interpreter
!   and it's implementation (including the standard library);
!   applications should not expect to define additional names using this
!   convention.  The set of names of this class defined by Python may be
!   extended in future versions.
!   See section~\ref{specialnames}, ``Special method names.''
! 
! \item[\code{__*}]
!   Class-private names.  Names in this category, when used within the
!   context of a class definition, are re-written to use a mangled for
!   to help avoid name clashes between ``private'' attributes of base
!   and derived classes.
!   See section~\ref{atom-identifiers}, ``Identifiers (Names).''
  
  \end{description}
  





More information about the Python-checkins mailing list