Pruss Manifesto - Long numbers

Michele Simionato mis6 at pitt.edu
Mon Nov 10 13:09:18 EST 2003


> Georgy Pruss wrote:
> 1) Underscores in numbers. It will help to read long numbers.
> E.g.
>    12 345 678
>    3.14159 26535 89793 23846

Typically, long numbers are not in the program code, but in an
external data file. Then, they can be read as strings and converted
to numbers with a one-liner:

>>> def i(x): return int(x.replace(" ",""))
... 
>>> i("1 234")
1234

So, this "feature" is not worth the effort, IMHO.

         Michele




More information about the Python-list mailing list