diff options
Diffstat (limited to 'Doc/ref')
-rw-r--r-- | Doc/ref/ref2.tex | 4 | ||||
-rw-r--r-- | Doc/ref/ref3.tex | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex index ba4c684..64853fb 100644 --- a/Doc/ref/ref2.tex +++ b/Doc/ref/ref2.tex @@ -523,10 +523,14 @@ The following tokens serve as delimiters in the grammar: \begin{verbatim} ( ) [ ] { } , : . ` = ; ++= -= *= /= %= **= +&= |= ^= >>= <<= \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 of other tokens or are otherwise significant to the lexical analyzer: diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index ec56d81..1b07296 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -1054,9 +1054,10 @@ methods \method{append()}, \method{count()}, \method{index()}, and \method{sort()}, like Python standard list objects. Finally, 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. +\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()} \ttindex{values()} @@ -1077,8 +1078,10 @@ multiplication (meaning repetition) by defining the methods \ttindex{sort()} \ttindex{__add__()} \ttindex{__radd__()} + \ttindex{__iadd__()} \ttindex{__mul__()} - \ttindex{__rmul__()}} + \ttindex{__rmul__()} + \ttindex{__imul__()}} \withsubitem{(numeric object method)}{\ttindex{__coerce__()}} \begin{methoddesc}[mapping object]{__len__}{self} |