Annoying octal notation

David 71david at libero.it
Sat Aug 22 05:15:16 EDT 2009


Il Fri, 21 Aug 2009 10:36:35 -0700 (PDT), Mensanator ha scritto:

> Aha! Then I WAS right after all. Switch to 3.1 and you'll
> soon be cured of that bad habit:
> 
>>>> 012 + 012
> SyntaxError: invalid token (<pyshell#4>, line 1)

I have tre (four) problems:

1) I am forced to use 2.5 since the production server has 2.5 installed.

2) Quite often I have to enter many zero-leading numbers and now my fingers
put a leading zero almost everywhere

3) I don't understand why useless but *harmless* things like algebrically
insignificant leading zeros should be *forbidden* and promoted to errors.

4) I still don't like the '0o..' notation because 0 (zero) and o (lowercase
O) glyphs appear very similar in many character sets. I'd prefer something
like '0c..' so it resembles the word 'oc' for 'octal'.

David



More information about the Python-list mailing list