Exponential Notation and integers

Fábio Mendes niels_bohr at uol.com.br
Thu Nov 18 21:28:05 EST 2004


Em Qui, 2004-11-18 às 15:49 -0800, Erik Max Francis escreveu:
> Timothy Fitz wrote:
> 
> > Why are all numberical literals in exponential notation floats? To me
> > it is counter-intuitive for 1e3 to behave so fundamentally different
> > from 1000.
> 
> Probably primarily by convention.  Most language use computerized 
> scientific notation to represent floating point numbers, not integers. 
> It makes sense, after all:  should 1.344e3 be an int, but 1.344e2 be a 
> float?
> 
As far as readbility is concerned, some languages provide the 1_000_000
syntax (1000000 is just too hard to read). Is there any plans to add
this to python?

Thanks,
Fabio

> -- 
> Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
> San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
>    I'll have to get over this sooner or later. Why not now?
>    -- Louis Wu



More information about the Python-list mailing list