Underscores in Python numbers

bonono at gmail.com bonono at gmail.com
Sat Nov 19 09:47:39 EST 2005


Sybren Stuvel wrote:
> bonono at gmail.com enlightened us with:
> > Of course, also support the locale variant where the meaning of ","
> > and "." is swapped in most European countries.
>
> This is exactly why I wouldn't use that notation. What happens if it
> is hardcoded into the source? I mean, that's what we're talking about.
> Then the program would have to have an indication of which locale is
> used for which source file. Without that, a program would be
> interpreted in a different way on different computers. I think that
> would be rather messy.
>
As mentioned in another post, we have that situation in all other
places. Such as

mm/dd/yyyy vs dd/mm/yyyy
decimal("10.23") - would european people expect decimal("10,23") to
work ?
0xffff - a notation for base 16

why can't I have "E100.000,23" to mean "100,000.23" ? Nothing but
notation.




More information about the Python-list mailing list