Engineering numerical format PEP discussion

Xavier Ho contact at xavierho.com
Mon Apr 26 01:54:00 EDT 2010


On Mon, Apr 26, 2010 at 3:39 PM, Chris Rebert <clp2 at rebertia.com> wrote:

> "The conversion **exactly follows the rules for conversion to
> scientific numeric string** except in the case of finite numbers
> **where exponential notation is used.**"
>

Well, then maybe the conversion doesn't exactly follow the rules, in this
case.


>
> The description of to-scientific-string explains exactly when it uses
> exponential notation, but it gets slightly technical and I'm not
> interested enough, nor do I have the time at the moment, to read the
> entire spec.


I understand. Emphasise mine, here: (so you don't have to read the entire
spec)

if the number is non-zero, the converted exponent is adjusted to be a
multiple of three (engineering notation) by positioning the decimal point
with one, two, or three characters preceding it* (that is, the part before
  the decimal point will range from 1 through 999);

*Perhaps this module could use some improvement. It is already very, very
good.

Cheers,
Xav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100426/5b05554c/attachment.html>


More information about the Python-list mailing list