From D

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Jul 24 20:47:51 EDT 2007


En Tue, 24 Jul 2007 11:10:53 -0300, Stargaming <stargaming at gmail.com>  
escribió:

> On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote:
>
>> There are various things I like about the D language that I think Python
>> too may enjoy. Here are few bits (mostly syntactical ones):
>>
>> 1) (we have discussed part of this in the past) You can put underscores
>> inside number literals, like 1_000_000, the compiler doesn't enforce the
>> position of such underscores, so you can also put them like this:
>> 1_00_000. You can put them in literals of decimals, binary, hex, etc. I
>
> Sounds like a good thing to be but the arbitrary positioning doesnt make
> any sense. Additionally, I'd suggest 10**n in such cases (eg. 10**6).

Why not? Because in English major numbers are labeled in thousands?  
(thousand, million, billion...)
In India, they're grouped by two after the first thousand; in China,  
they're grouped each 4 digits (that is, there is a single word for "ten  
thousands" = wan4 = 万, and the next required word is for 10**8 = yi4 = 亿)

-- 
Gabriel Genellina




More information about the Python-list mailing list