On Jul 25, 7:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Jul 24, 6:08 pm, Steven D'Aprano
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > On Tue, 24 Jul 2007 20:09:00 +0200, Bjoern Schliessmann wrote:
> > > Stargaming wrote:
> > >> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote:
>
> > >>> While in a syntax like:
> > >>> for i in xrange(1_000_000):
> > >>> my eyes help me group them at once.
>
> > >> Sounds like a good thing to be but the arbitrary positioning
> > >> doesnt make any sense.
>
> > > Checking underscore positions would only add complexity. Why not
> > > just ignore them, no matter where they are?
>
> > Underscores in numerics are UGLY. Why not take a leaf out of implicit
> > string concatenation and allow numeric literals to implicitly concatenate?
>
> > Python already does:
> > "hello-" "world" => "hello-world"
>
> > Propose:
> > 123 456 789 => 123456789
> > 123.456 789 => 123.456789
>
> So, spaces will no longer be delimiters? Won't that cause
> much wailing and gnashing of teeth?

Nope. Just replace the current grammar rule

atom: ... NAME | STRING+ | NUMBER

by

atom: ... NAME | STRING+ | NUMBER+

The resulting grammar is still free of ambiguities. The tokenizer
doesn't complain anyway - not even yet.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to