diff options
| author | Raymond Hettinger <python@rcn.com> | 2002-05-21 18:19:49 +0000 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2002-05-21 18:19:49 +0000 |
| commit | 6cf09f0792df49527cda241743a34c3555a83835 (patch) | |
| tree | e3e9c616f06b39d1bd693d312bd89c8b63e5f782 /Doc/lib | |
| parent | 97394bc7950d898843f7136c5af69279ea9bb080 (diff) | |
| download | cpython-git-6cf09f0792df49527cda241743a34c3555a83835.tar.gz | |
Patch 543387. Document deprecation of complex %, //,and divmod().
Diffstat (limited to 'Doc/lib')
| -rw-r--r-- | Doc/lib/libfuncs.tex | 6 | ||||
| -rw-r--r-- | Doc/lib/libstdtypes.tex | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index c7bb5a628f..158ea0c9c8 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -248,9 +248,9 @@ def my_import(name): \end{funcdesc} \begin{funcdesc}{divmod}{a, b} - Take two numbers as arguments and return a pair of numbers consisting - of their quotient and remainder when using long division. With mixed - operand types, the rules for binary arithmetic operators apply. For + Take two (non complex) numbers as arguments and return a pair of numbers + consisting of their quotient and remainder when using long division. With + mixed operand types, the rules for binary arithmetic operators apply. For plain and long integers, the result is the same as \code{(\var{a} / \var{b}, \var{a} \%{} \var{b})}. For floating point numbers the result is \code{(\var{q}, \var{a} \%{} diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index f2cbe74935..143b05ae54 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -218,8 +218,8 @@ to coerce numbers to a specific type. \bifuncindex{float} \bifuncindex{complex} -All numeric types support the following operations, sorted by -ascending priority (operations in the same box have the same +All numeric types (except complex) support the following operations, +sorted by ascending priority (operations in the same box have the same priority; all numeric operations have a higher priority than comparison operations): @@ -229,7 +229,7 @@ comparison operations): \hline \lineiii{\var{x} * \var{y}}{product of \var{x} and \var{y}}{} \lineiii{\var{x} / \var{y}}{quotient of \var{x} and \var{y}}{(1)} - \lineiii{\var{x} \%{} \var{y}}{remainder of \code{\var{x} / \var{y}}}{} + \lineiii{\var{x} \%{} \var{y}}{remainder of \code{\var{x} / \var{y}}}{(4)} \hline \lineiii{-\var{x}}{\var{x} negated}{} \lineiii{+\var{x}}{\var{x} unchanged}{} @@ -240,7 +240,7 @@ comparison operations): \lineiii{float(\var{x})}{\var{x} converted to floating point}{} \lineiii{complex(\var{re},\var{im})}{a complex number with real part \var{re}, imaginary part \var{im}. \var{im} defaults to zero.}{} \lineiii{\var{c}.conjugate()}{conjugate of the complex number \var{c}}{} - \lineiii{divmod(\var{x}, \var{y})}{the pair \code{(\var{x} / \var{y}, \var{x} \%{} \var{y})}}{(3)} + \lineiii{divmod(\var{x}, \var{y})}{the pair \code{(\var{x} / \var{y}, \var{x} \%{} \var{y})}}{(3)(4)} \lineiii{pow(\var{x}, \var{y})}{\var{x} to the power \var{y}}{} \lineiii{\var{x} ** \var{y}}{\var{x} to the power \var{y}}{} \end{tableiii} @@ -273,6 +273,12 @@ for well-defined conversions. See section \ref{built-in-funcs}, ``Built-in Functions,'' for a full description. +\item[(4)] +Complex floor division operator, modulo operator, and \function{divmod()}. + +\deprecated{2.3}{Instead convert to float using \function{abs()} +if appropriate.} + \end{description} % XXXJH exceptions: overflow (when? what operations?) zerodivision |
