@@ -1114,6 +1114,7 @@ \subsection{Additional methods for emulation of sequence types
11141114notation, \method {__getitem__()}, \method {__setitem__()}
11151115or\method {__delitem__()} is called.
11161116
1117+
11171118\subsection {Emulating numeric types\label {numeric-types } }
11181119
11191120The following methods can be defined to emulate numeric objects.
@@ -1182,17 +1183,19 @@ \subsection{Emulating numeric types\label{numeric-types}}
11821183\function {abs()}\bifuncindex {abs} and \code {~}).
11831184\end {methoddesc }
11841185
1185- \begin {methoddesc }[numeric interface]{__int__}{self}
1186- \methodlineni {__long__}{self}
1187- \methodlineni {__float__}{self}
1186+ \begin {methoddesc }[numeric interface]{__complex__}{self}
1187+ \methodline {__int__}{self}
1188+ \methodline {__long__}{self}
1189+ \methodline {__float__}{self}
11881190Called to implement the built-in functions
1189- \function {int()}\bifuncindex {int}, \function {long()}\bifuncindex {long}
1191+ \function {complex()}\bifuncindex {complex},
1192+ \function {int()}\bifuncindex {int}, \function {long()}\bifuncindex {long},
11901193and \function {float()}\bifuncindex {float}. Should return a value of
11911194the appropriate type.
11921195\end {methoddesc }
11931196
11941197\begin {methoddesc }[numeric interface]{__oct__}{self}
1195- \methodlineni {__hex__}{self}
1198+ \methodline {__hex__}{self}
11961199Called to implement the built-in functions
11971200\function {oct()}\bifuncindex {oct} and
11981201\function {hex()}\bifuncindex {hex}. Should return a string value.
0 commit comments