[Python-checkins] python/dist/src/Doc/ref ref3.tex,1.82.4.8,1.82.4.9

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Mon, 12 May 2003 06:50:43 -0700


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

Modified Files:
      Tag: release22-maint
	ref3.tex 
Log Message:
Add a specific mention of the term "operator overloading" and add an
index entry.  Suggested to python-docs.


Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.82.4.8
retrieving revision 1.82.4.9
diff -C2 -d -r1.82.4.8 -r1.82.4.9
*** ref3.tex	20 Mar 2003 18:22:50 -0000	1.82.4.8
--- ref3.tex	12 May 2003 13:50:41 -0000	1.82.4.9
***************
*** 895,899 ****
  A class can implement certain operations that are invoked by special
  syntax (such as arithmetic operations or subscripting and slicing) by
! defining methods with special names.  For instance, if a class defines
  a method named \method{__getitem__()}, and \code{x} is an instance of
  this class, then \code{x[i]} is equivalent to
--- 895,902 ----
  A class can implement certain operations that are invoked by special
  syntax (such as arithmetic operations or subscripting and slicing) by
! defining methods with special names.\indexii{operator}{overloading}
! This is Python's approach to \dfn{operator overloading}, allowing
! classes to define their own behavior with respect to language
! operators.  For instance, if a class defines
  a method named \method{__getitem__()}, and \code{x} is an instance of
  this class, then \code{x[i]} is equivalent to