[Python-ideas] real numbers with SI scale factors

Sven R. Kunze srkunze at mail.de
Mon Aug 29 16:45:14 EDT 2016


On 29.08.2016 05:40, Brendan Barnwell wrote:
> On 2016-08-28 20:29, Ken Kundert wrote:
>> What is wrong with have two ways of doing things? We have many ways of
>> specifying the value of the integer 16: 0b10000, 0o20, 16, 0x10, 16L, 
>> ....
>
>     Zen of Python: "There should be one-- and preferably only one 
> --obvious way to do it."
>
>     If Python didn't have binary or octal notation and someone came 
> here proposing it, I would not support it, for the same reasons I 
> don't support your proposal.  If someone proposed eliminating binary 
> or octal notation for Python 4 (or even maybe Python 3.8), I would 
> probably support it for the same reason. Those notations are not 
> useful enough to justify their existence. Hexadecimal is more 
> justifiable as it is far more widely used, but I would be more open to 
> removing hexadecimal than I would be to adding octal.
>
>     Also, "L" as a long-integer suffix is already gone in Python 3.
>

And now we have '_' in numbers.

So much for "preferably one way".


Sven


More information about the Python-ideas mailing list