Why Python don't accept 03 as a number?

Ian Kelly ian.g.kelly at gmail.com
Sat Dec 8 03:35:43 EST 2018


On Fri, Dec 7, 2018 at 11:56 PM Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote:
>
> A comment from the sideline: one could imagine extending the Python syntax
> with a (optional) 0d prefix that allows for explicit specification of
> decimal values. They would "complete" the family:
>
> * 0b: binary number
> * 0o: octal number
> * 0d: decimal number
> * 0x: hexadecimal number

That's nice and elegant, but what would be the use case?



More information about the Python-list mailing list