[Python-checkins] CVS: python/dist/src/Doc/ref ref2.tex,1.18,1.19 ref3.tex,1.48,1.49

Thomas Wouters python-dev@python.org
Thu, 24 Aug 2000 13:06:07 -0700


Update of /cvsroot/python/python/dist/src/Doc/ref
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12418/ref

Modified Files:
	ref2.tex ref3.tex 
Log Message:

Rough and incomplete documentation on augmented assignment, which follows
shortly. Markup also needs checking.



Index: ref2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** ref2.tex	2000/04/03 04:41:18	1.18
--- ref2.tex	2000/08/24 20:06:04	1.19
***************
*** 524,531 ****
--- 524,535 ----
  (       )       [       ]       {       }
  ,       :       .       `       =       ;
+ +=      -=      *=      /=      %=      **=
+ &=      |=      ^=      >>=     <<=
  \end{verbatim}
  
  The period can also occur in floating-point and imaginary literals.  A
  sequence of three periods has a special meaning as an ellipsis in slices.
+ The second half of the list, the augmented assignment operators, serve
+ lexically as delimiters, but also perform an operation.
  
  The following printing ASCII characters have special meaning as part

Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** ref3.tex	2000/08/18 02:42:14	1.48
--- ref3.tex	2000/08/24 20:06:04	1.49
***************
*** 1055,1061 ****
  sequence types should implement addition (meaning concatenation) and
  multiplication (meaning repetition) by defining the methods
! \method{__add__()}, \method{__radd__()}, \method{__mul__()} and
! \method{__rmul__()} described below; they should not define
! \method{__coerce__()} or other numerical operators.
  \withsubitem{(mapping object method)}{
    \ttindex{keys()}
--- 1055,1062 ----
  sequence types should implement addition (meaning concatenation) and
  multiplication (meaning repetition) by defining the methods
! \method{__add__()}, \method{__radd__()}, \method{__iadd__()},
! \method{__mul__()}, \method{__rmul__()} and \method{__imul__()} described
! below; they should not define \method{__coerce__()} or other numerical
! operators.
  \withsubitem{(mapping object method)}{
    \ttindex{keys()}
***************
*** 1078,1083 ****
    \ttindex{__add__()}
    \ttindex{__radd__()}
    \ttindex{__mul__()}
!   \ttindex{__rmul__()}}
  \withsubitem{(numeric object method)}{\ttindex{__coerce__()}}
  
--- 1079,1086 ----
    \ttindex{__add__()}
    \ttindex{__radd__()}
+   \ttindex{__iadd__()}
    \ttindex{__mul__()}
!   \ttindex{__rmul__()}
!   \ttindex{__imul__()}}
  \withsubitem{(numeric object method)}{\ttindex{__coerce__()}}