diff options
author | Georg Brandl <georg@python.org> | 2009-01-03 22:05:22 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-03 22:05:22 (GMT) |
commit | 8c8cc6b3922582cd31a9c03337da71552413174f (patch) | |
tree | 8806a7c4e6fbdb12e1f7055f286dc8b3c68e4851 | |
parent | fe427895b58769840f1f61a82ea0cdfe55150347 (diff) | |
download | cpython-8c8cc6b3922582cd31a9c03337da71552413174f.zip cpython-8c8cc6b3922582cd31a9c03337da71552413174f.tar.gz cpython-8c8cc6b3922582cd31a9c03337da71552413174f.tar.bz2 |
Manually merge r67868 from 2.6 branch.
-rw-r--r-- | Doc/library/stdtypes.rst | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 7192b1e..732478e 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -338,15 +338,13 @@ Notes: module: math single: floor() (in module math) single: ceil() (in module math) + single: trunc() (in module math) pair: numeric; conversions - pair: C; language - Conversion from floating point to (long or plain) integer may round or - truncate as in C; see functions :func:`math.floor` and :func:`math.ceil` for - well-defined conversions. - - .. deprecated:: 2.6 - Instead, convert floats to long explicitly with :func:`trunc`. + Conversion from floats using :func:`int` or :func:`long` truncates toward + zero like the related function, :func:`math.trunc`. Use the function + :func:`math.floor` to round downward and :func:`math.ceil` to round + upward. (3) See :ref:`built-in-funcs` for a full description. |