Mark Dickinson <dicki...@gmail.com> added the comment:

Proposed revision:

General format.  For a given precision ``p >= 1``, this rounds the number to 
``p`` 
significant digits and then formats the result in either fixed-point format or 
in 
scientific notation, depending on its magnitude.  The precise rules are as 
follows: 
suppose that the result formatted with presentation type ``e`` and precision 
``p-1`` 
would have exponent ``exp``.  Then if ``-4 <= exp < p``, the number is 
formatted as 
if with presentation type ``f`` and precision chosen in such a way as to give 
``p`` 
significant digits.  Otherwise, the number is formatted as if with presentation 
type 
``e`` and precision ``p-1``.

A precision of ``0`` is treated as equivalent to a precision of ``1``.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7051>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to