[Python-checkins] r68240 - python/trunk/Doc/library/stdtypes.rst

georg.brandl python-checkins at python.org
Sat Jan 3 23:05:24 CET 2009


Author: georg.brandl
Date: Sat Jan  3 23:05:22 2009
New Revision: 68240

Log:
Manually merge r67868 from 2.6 branch.


Modified:
   python/trunk/Doc/library/stdtypes.rst

Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst	(original)
+++ python/trunk/Doc/library/stdtypes.rst	Sat Jan  3 23:05:22 2009
@@ -338,15 +338,13 @@
       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.


More information about the Python-checkins mailing list