diff options
author | Fred Drake <fdrake@acm.org> | 1997-12-04 14:20:59 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1997-12-04 14:20:59 (GMT) |
commit | 98b032a7c0da30347a6e188481ce851aee5c3165 (patch) | |
tree | 19c2319526e64e2c9583f99e0893634f0ff240e2 /Doc/lib/liboperator.tex | |
parent | 1cf87496a641168969e3a95ba2cf04c922b36e34 (diff) | |
download | cpython-98b032a7c0da30347a6e188481ce851aee5c3165.zip cpython-98b032a7c0da30347a6e188481ce851aee5c3165.tar.gz cpython-98b032a7c0da30347a6e188481ce851aee5c3165.tar.bz2 |
Removed unnecessary escaping.
Diffstat (limited to 'Doc/lib/liboperator.tex')
-rw-r--r-- | Doc/lib/liboperator.tex | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Doc/lib/liboperator.tex b/Doc/lib/liboperator.tex index d7c11fc..238a060 100644 --- a/Doc/lib/liboperator.tex +++ b/Doc/lib/liboperator.tex @@ -7,49 +7,49 @@ The \code{operator} module exports a set of functions implemented in C corresponding to the intrinsic operators of Python. For example, {}\code{operator.add(x, y)} is equivalent to the expression x+y. The function names are those used for special class methods; variants without -leading and trailing '\_\_' are also provided for convenience. +leading and trailing \samp{__} are also provided for convenience. The \code{operator} module defines the following functions: \renewcommand{\indexsubitem}{(in module operator)} -\begin{funcdesc}{add}{a\, b} +\begin{funcdesc}{add}{a, b} Return a + b, for a and b numbers. \end{funcdesc} -\begin{funcdesc}{\_\_add\_\_}{a\, b} +\begin{funcdesc}{__add__}{a, b} Return a + b, for a and b numbers. \end{funcdesc} -\begin{funcdesc}{sub}{a\, b} +\begin{funcdesc}{sub}{a, b} Return a - b. \end{funcdesc} -\begin{funcdesc}{\_\_sub\_\_}{a\, b} +\begin{funcdesc}{__sub__}{a, b} Return a - b. \end{funcdesc} -\begin{funcdesc}{mul}{a\, b} +\begin{funcdesc}{mul}{a, b} Return a * b, for a and b numbers. \end{funcdesc} -\begin{funcdesc}{\_\_mul\_\_}{a\, b} +\begin{funcdesc}{__mul__}{a, b} Return a * b, for a and b numbers. \end{funcdesc} -\begin{funcdesc}{div}{a\, b} +\begin{funcdesc}{div}{a, b} Return a / b. \end{funcdesc} -\begin{funcdesc}{\_\_div\_\_}{a\, b} +\begin{funcdesc}{__div__}{a, b} Return a / b. \end{funcdesc} -\begin{funcdesc}{mod}{a\, b} +\begin{funcdesc}{mod}{a, b} Return a \% b. \end{funcdesc} -\begin{funcdesc}{\_\_mod\_\_}{a\, b} +\begin{funcdesc}{__mod__}{a, b} Return a \% b. \end{funcdesc} @@ -57,7 +57,7 @@ Return a \% b. Return o negated. \end{funcdesc} -\begin{funcdesc}{\_\_neg\_\_}{o} +\begin{funcdesc}{__neg__}{o} Return o negated. \end{funcdesc} @@ -65,7 +65,7 @@ Return o negated. Return o positive. \end{funcdesc} -\begin{funcdesc}{\_\_pos\_\_}{o} +\begin{funcdesc}{__pos__}{o} Return o positive. \end{funcdesc} @@ -73,7 +73,7 @@ Return o positive. Return the absolute value of o. \end{funcdesc} -\begin{funcdesc}{\_\_abs\_\_}{o} +\begin{funcdesc}{__abs__}{o} Return the absolute value of o. \end{funcdesc} @@ -81,103 +81,103 @@ Return the absolute value of o. Return the inverse of o. \end{funcdesc} -\begin{funcdesc}{\_\_inv\_\_}{o} +\begin{funcdesc}{__inv__}{o} Return the inverse of o. \end{funcdesc} -\begin{funcdesc}{lshift}{a\, b} +\begin{funcdesc}{lshift}{a, b} Return a shifted left by b. \end{funcdesc} -\begin{funcdesc}{\_\_lshift\_\_}{a\, b} +\begin{funcdesc}{__lshift__}{a, b} Return a shifted left by b. \end{funcdesc} -\begin{funcdesc}{rshift}{a\, b} +\begin{funcdesc}{rshift}{a, b} Return a shifted right by b. \end{funcdesc} -\begin{funcdesc}{\_\_rshift\_\_}{a\, b} +\begin{funcdesc}{__rshift__}{a, b} Return a shifted right by b. \end{funcdesc} -\begin{funcdesc}{and\_}{a\, b} +\begin{funcdesc}{and_}{a, b} Return the bitwise and of a and b. \end{funcdesc} -\begin{funcdesc}{\_\_and\_\_}{a\, b} +\begin{funcdesc}{__and__}{a, b} Return the bitwise and of a and b. \end{funcdesc} -\begin{funcdesc}{or\_}{a\, b} +\begin{funcdesc}{or_}{a, b} Return the bitwise or of a and b. \end{funcdesc} -\begin{funcdesc}{\_\_or\_\_}{a\, b} +\begin{funcdesc}{__or__}{a, b} Return the bitwise or of a and b. \end{funcdesc} -\begin{funcdesc}{concat}{a\, b} +\begin{funcdesc}{concat}{a, b} Return a + b for a and b sequences. \end{funcdesc} -\begin{funcdesc}{\_\_concat\_\_}{a\, b} +\begin{funcdesc}{__concat__}{a, b} Return a + b for a and b sequences. \end{funcdesc} -\begin{funcdesc}{repeat}{a\, b} +\begin{funcdesc}{repeat}{a, b} Return a * b where a is a sequence and b is an integer. \end{funcdesc} -\begin{funcdesc}{\_\_repeat\_\_}{a\, b} +\begin{funcdesc}{__repeat__}{a, b} Return a * b where a is a sequence and b is an integer. \end{funcdesc} -\begin{funcdesc}{getitem}{a\, b} +\begin{funcdesc}{getitem}{a, b} Return the value of a at index b. \end{funcdesc} -\begin{funcdesc}{\_\_getitem\_\_}{a\, b} +\begin{funcdesc}{__getitem__}{a, b} Return the value of a at index b. \end{funcdesc} -\begin{funcdesc}{setitem}{a\, b\, c} +\begin{funcdesc}{setitem}{a, b, c} Set the value of a at index b to c. \end{funcdesc} -\begin{funcdesc}{\_\_setitem\_\_}{a\, b\, c} +\begin{funcdesc}{__setitem__}{a, b, c} Set the value of a at index b to c. \end{funcdesc} -\begin{funcdesc}{delitem}{a\, b} +\begin{funcdesc}{delitem}{a, b} Set the value of a at index b. \end{funcdesc} -\begin{funcdesc}{\_\_delitem\_\_}{a\, b} +\begin{funcdesc}{__delitem__}{a, b} Set the value of a at index b. \end{funcdesc} -\begin{funcdesc}{getslice}{a\, b\, c} +\begin{funcdesc}{getslice}{a, b, c} Return the slice of a from index b to index c-1. \end{funcdesc} -\begin{funcdesc}{\_\_getslice\_\_}{a\, b\, c} +\begin{funcdesc}{__getslice__}{a, b, c} Return the slice of a from index b to index c-1. \end{funcdesc} -\begin{funcdesc}{setslice}{a\, b\, c\, v} +\begin{funcdesc}{setslice}{a, b, c, v} Set the slice of a from index b to index c-1 to the sequence v. \end{funcdesc} -\begin{funcdesc}{\_\_setslice\_\_}{a\, b\, c\, v} +\begin{funcdesc}{__setslice__}{a, b, c, v} Set the slice of a from index b to index c-1 to the sequence v. \end{funcdesc} -\begin{funcdesc}{delslice}{a\, b\, c} +\begin{funcdesc}{delslice}{a, b, c} Delete the slice of a from index b to index c-1. \end{funcdesc} -\begin{funcdesc}{\_\_delslice\_\_}{a\, b\, c} +\begin{funcdesc}{__delslice__}{a, b, c} Delete the slice of a from index b to index c-1. \end{funcdesc} |