[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

Mattias Engdegård mattias at virtutech.se
Thu Mar 15 17:28:27 CET 2007


Georg Brandl <g.brandl at gmx.net> writes:

>Seriously, nobody, even coming from another language, will be able to look at it
>and say, "yes, that's an octal literal."

Scientific googling reveals that most other languages that use 0x for hex use
0b for binary and either 0o or 0 for octal, so if "cultural compatibility"
is important, this may influence the choice.

Whatever prefix is used, it should be clearly offset visually from the number,
so it's clear what prefix it is and where the digits start. 0 as a prefix
does not really have this property - a good reason to change; 0o and 0b both
work. 0c may be slightly better than 0t, graphically speaking.



More information about the Python-3000 mailing list