[Python-Dev] Octal literals

Bengt Richter bokr at oz.net
Fri Feb 3 01:27:19 CET 2006


On Fri, 3 Feb 2006 10:16:17 +1100, "Delaney, Timothy (Tim)" <tdelaney at avaya.com> wrote:
>Andrew Koenig wrote:
>>>> I definately agree with the 0c664 octal literal. Seems rather more
>>> intuitive.
>>>> I still prefer 8r664.
>>The more I look at this, the worse it gets. Something beginning with
>zero (like 0xFF, 0c664) immediately stands out as "unusual". Something
>beginning with any other digit doesn't. This just looks like noise to
>me.
>>I found the suffix version even worse, but they're blown out of the
>water anyway by the fact that FFr16 is a valid identifier.
>Are you sure you aren't just used to the x in 0xff? I.e., if the leading
0 were just an alias for 16, we could use 8x664 instead of 8r664.
BTW Ada uses radix prefix, but with # separating the prefix, so we can't use that.
How about apostrophe as separator?
 8'664 # or the suffix version could work also, although you'd have to back out of some names:
 664'8
 bee'16
Regards,
Bengt Richter


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /