[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal
g.brandl at gmx.net
Thu Mar 15 19:05:37 CET 2007
Guido van Rossum schrieb:
> On 3/15/07, Mattias Engdegård <mattias at virtutech.se> wrote:
>> 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.
> 0c was rejected because in some fonts 'c' looks too much like a zero;
> though it wasn't me and I don't recall every having this issue. I'm
> somewhat uncomfortable with 0o because the zero in some fonts is about
> the same size as a lowercase oh; but I'd be willing to support it in
> the name of conventionality. Frankly, the choice of letter is a minor
> issue to me that I'd gladly leave to others to discuss and decide.
My concern is that I don't want to have to write something like
x = 0t755 # octal literal
because then I can also write
x = 493 # 0755 in octal
and don't need octal literals at all.
More information about the Python-3000