File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -933,6 +933,17 @@ \subsection{Basic customization\label{customization}}
933933\index {comparisons}
934934\end {methoddesc }
935935
936+ \begin {methoddesc }[object]{__rcmp__}{self, other}
937+ Called by all comparison operations. Should return a negative integer if
938+ \code {self < other}, zero if \code {self == other}, a positive integer if
939+ \code {self > other}. If no \method {__cmp__()} operation is defined, class
940+ instances are compared by object identity (`` address'' ).
941+ (Note: the restriction that exceptions are not propagated by
942+ \method {__cmp__()} has been removed in Python 1.5.)
943+ \bifuncindex {cmp}
944+ \index {comparisons}
945+ \end {methoddesc }
946+
936947\begin {methoddesc }[object]{__hash__}{self}
937948Called for the key object for dictionary\obindex {dictionary}
938949operations, and by the built-in function
@@ -1201,7 +1212,7 @@ \subsection{Emulating numeric types\label{numeric-types}}
12011212\methodline [numeric object]{__abs__}{self}
12021213\methodline [numeric object]{__invert__}{self}
12031214Called to implement the unary arithmetic operations (\code {-}, \code {+},
1204- \function {abs()}\bifuncindex {abs} and \code {~ }).
1215+ \function {abs()}\bifuncindex {abs} and \code {\~ {} }).
12051216\end {methoddesc }
12061217
12071218\begin {methoddesc }[numeric object]{__complex__}{self}
You can’t perform that action at this time.
0 commit comments