diff options
author | Fred Drake <fdrake@acm.org> | 1999-02-12 18:14:57 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-02-12 18:14:57 (GMT) |
commit | 15988fdbbb109029bd59b394d2fff3a72ca10d1c (patch) | |
tree | 9771dd533af7bcaabbbc1a73aabff2dba731fb76 /Doc/ref/ref3.tex | |
parent | 72ce85823cb9da79aa2663fd5d6eeecb3dad7b9c (diff) | |
download | cpython-15988fdbbb109029bd59b394d2fff3a72ca10d1c.zip cpython-15988fdbbb109029bd59b394d2fff3a72ca10d1c.tar.gz cpython-15988fdbbb109029bd59b394d2fff3a72ca10d1c.tar.bz2 |
Documented __complex__(), made sure all the discipline names hit the
index.
Diffstat (limited to 'Doc/ref/ref3.tex')
-rw-r--r-- | Doc/ref/ref3.tex | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index f1dbae2..7ae92c0 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -1114,6 +1114,7 @@ single colon is used. For slice operations involving extended slice notation, \method{__getitem__()}, \method{__setitem__()} or\method{__delitem__()} is called. + \subsection{Emulating numeric types\label{numeric-types}} The following methods can be defined to emulate numeric objects. @@ -1182,17 +1183,19 @@ Called to implement the unary arithmetic operations (\code{-}, \code{+}, \function{abs()}\bifuncindex{abs} and \code{~}). \end{methoddesc} -\begin{methoddesc}[numeric interface]{__int__}{self} -\methodlineni{__long__}{self} -\methodlineni{__float__}{self} +\begin{methoddesc}[numeric interface]{__complex__}{self} +\methodline{__int__}{self} +\methodline{__long__}{self} +\methodline{__float__}{self} Called to implement the built-in functions -\function{int()}\bifuncindex{int}, \function{long()}\bifuncindex{long} +\function{complex()}\bifuncindex{complex}, +\function{int()}\bifuncindex{int}, \function{long()}\bifuncindex{long}, and \function{float()}\bifuncindex{float}. Should return a value of the appropriate type. \end{methoddesc} \begin{methoddesc}[numeric interface]{__oct__}{self} -\methodlineni{__hex__}{self} +\methodline{__hex__}{self} Called to implement the built-in functions \function{oct()}\bifuncindex{oct} and \function{hex()}\bifuncindex{hex}. Should return a string value. |