[Python-ideas] 1 246 358 (was: 1_000_000)

Guido van Rossum guido at python.org
Sat May 7 02:54:15 CEST 2011


Too ambiguous, too hard to parse. I like the _ proposal.
On May 6, 2011 5:45 PM, "Ben Finney" <ben+python at benfinney.id.au> wrote:
> Greg Ewing <greg.ewing at canterbury.ac.nz> writes:
>
>> An alternative would be to allow spaces.
>
> I would prefer to allow space between digits in a numeric literal.
>
> 1 2345 6789
> 1 2 3 4 5 6789
> 1 234 6789
> 1 234 567 89
> 9.876 543 210
> 0xFEFF 0042
>
> This nicely parallels the fact that space can separate chunks of a
> string literal.
>
> But that still leaves the following inconsistency:
>
> int('1 234 567')
>
> That will currently raise a ValueError. Should it continue to do so
> under this proposal?
>
> --
> \ “You say “Carmina”, and I say “Burana”, You say “Fortuna”, and |
> `\ I say “cantata”, Carmina, Burana, Fortuna, cantata, Let's Carl |
> _o__) the whole thing Orff.” —anonymous |
> Ben Finney
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110506/93a3bbe1/attachment.html>


More information about the Python-ideas mailing list