]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify the round-off behavior of int().
authorRaymond Hettinger <python@rcn.com>
Sat, 20 Dec 2008 07:28:32 +0000 (07:28 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 20 Dec 2008 07:28:32 +0000 (07:28 +0000)
Remove incorrect deprecation (int is alive and well).

Doc/library/stdtypes.rst

index 00d420bda9a0300f0829030d27cad869dfdb9cdf..f63e9dc0ce88f05e3a8a55d961a31cae75fc2daa 100644 (file)
@@ -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.