From D

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Tue Jul 24 19:08:37 EDT 2007


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


-- 
Steven.




More information about the Python-list mailing list