[Python-Dev] Octal literals
paul-python at svensson.org
Wed Feb 1 19:54:49 CET 2006
On Wed, 1 Feb 2006, Barry Warsaw wrote:
> The proposal for something like 0xff, 0o664, and 0b1001001 seems like
> the right direction, although 'o' for octal literal looks kind of funky.
> Maybe 'c' for oCtal? (remember it's 'x' for heXadecimal).
Shouldn't it be 0t644 then, and 0n1001001 for binary ?
That would sidestep the issue of 'b' and 'c' being valid
hexadecimal digits as well.
Regarding negative numbers, I think they're a red herring.
If there is any need for a new literal format,
it would be to express ~0x0f, not -0x10.
1xf0 has been proposed before, but I think YAGNI.
More information about the Python-Dev