Engineering numerical format PEP discussion

Grant Edwards invalid at invalid.invalid
Mon Apr 26 10:15:40 EDT 2010


On 2010-04-26, Keith <keith.brafford at gmail.com> wrote:

> I am considering writing a PEP for the inclusion of an engineering
> format specifier, and would appreciate input from others.

I very regularly do something similar in various apps, though I often
want to specify the exponent (e.g. I always want to print a given
value in "mega" scaling even if that ends up as 0.090e3 or 1000.010e3.

So I would suggest adding an optional "exponent" value such that "%3n"
would always result in <whatever>e+03

-- 
Grant Edwards               grant.b.edwards        Yow! You were s'posed
                                  at               to laugh!
                              gmail.com            



More information about the Python-list mailing list