[Python-checkins] r84066 - in python/branches/release27-maint: Doc/whatsnew/2.7.rst

mark.dickinson python-checkins at python.org
Sun Aug 15 11:54:37 CEST 2010


Author: mark.dickinson
Date: Sun Aug 15 11:54:37 2010
New Revision: 84066

Log:
Merged revisions 84065 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84065 | mark.dickinson | 2010-08-15 10:43:29 +0100 (Sun, 15 Aug 2010) | 1 line
  
  Clarify whatsnew entry for short float repr:  roundtripping is not a new feature in 2.7.
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Doc/whatsnew/2.7.rst

Modified: python/branches/release27-maint/Doc/whatsnew/2.7.rst
==============================================================================
--- python/branches/release27-maint/Doc/whatsnew/2.7.rst	(original)
+++ python/branches/release27-maint/Doc/whatsnew/2.7.rst	Sun Aug 15 11:54:37 2010
@@ -141,10 +141,12 @@
 * The :class:`memoryview` object.
 * A small subset of the :mod:`importlib` module,
   `described below <#importlib-section>`__.
-* Float-to-string and string-to-float conversions now round their
-  results more correctly, and :func:`repr` of a floating-point
-  number *x* returns a result that's guaranteed to round back to the
-  same number when converted back to a float.
+* The :func:`repr` of a float ``x`` is shorter in many cases: it's now
+  based on the shortest decimal string that's guaranteed to round back
+  to ``x``.  As in previous versions of Python, it's guaranteed that
+  ``float(repr(x))`` recovers ``x``.
+* Float-to-string and string-to-float conversions are correctly rounded.
+  The :func:`round` function is also now correctly rounded.
 * The :ctype:`PyCapsule` type, used to provide a C API for extension modules.
 * The :cfunc:`PyLong_AsLongAndOverflow` C API function.
 


More information about the Python-checkins mailing list