[Python-checkins] r71646 - python/branches/py3k-short-float-repr/Doc/library/sys.rst
mark.dickinson
python-checkins at python.org
Thu Apr 16 14:50:15 CEST 2009
Author: mark.dickinson
Date: Thu Apr 16 14:50:14 2009
New Revision: 71646
Log:
Add docs for sys.float_repr_style
Modified:
python/branches/py3k-short-float-repr/Doc/library/sys.rst
Modified: python/branches/py3k-short-float-repr/Doc/library/sys.rst
==============================================================================
--- python/branches/py3k-short-float-repr/Doc/library/sys.rst (original)
+++ python/branches/py3k-short-float-repr/Doc/library/sys.rst Thu Apr 16 14:50:14 2009
@@ -266,6 +266,19 @@
The information in the table is simplified.
+.. data:: float_repr_style
+
+ A string indicating how the :func:`repr` function behaves for
+ floats. If the string has value ``'short'`` then for a finite
+ float ``x``, ``repr(x)`` aims to produce a short string with the
+ property that ``float(repr(x)) == x``. This is the usual behaviour
+ in Python 3.1 and later. Otherwise, ``float_repr_style`` has value
+ ``'legacy'`` and ``repr(x)`` behaves in the same way as it did in
+ versions of Python prior to 3.1.
+
+ .. versionadded:: 3.1
+
+
.. function:: getcheckinterval()
Return the interpreter's "check interval"; see :func:`setcheckinterval`.
More information about the Python-checkins
mailing list