Octal notation: severe deprecation
Peter Hansen
peter at engcorp.com
Thu Jan 13 08:18:25 EST 2005
and-google at doxdesk.com wrote:
> In Mythical Future Python I would like to be able to use any base in
> integer literals, which would be better. Example random syntax:
>
> flags= 2x00011010101001
> umask= 8x664
> answer= 10x42
> addr= 16x0E800004 # 16x == 0x
> gunk= 36x8H6Z9A0X
I think I kinda like this idea. Allowing arbitrary values,
however, would probably be pointless, as there are very
few bases in common enough use that a language should make
it easy to write literals in any of them. So I think "36x"
is silly, and would suggest limiting this to 2, 8, 10, and
16. At the very least, a range of 2-16 should be used.
(It would be cute but pointless to allow 1x000000000. :-)
-Peter
More information about the Python-list
mailing list