[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal
Guido van Rossum
guido at python.org
Thu Mar 15 18:21:41 CET 2007
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 main interest is that we should move away from just leading zero as
octal, disallow leading zero altogether because of the confusion it
would cause for folks coming from other neutral about the choice
between 0o, 0c or 0t.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000