On Aug 20, 3:06 pm, David <71da...@libero.it> wrote:
> Hi all,
>
> Is there some magic to make the 2.x CPython interpreter to ignore the
> annoying octal notation?

No.  You would have to modify and recompile the interpreter. This is
not exactly trivial, see "How to Change Python's Grammar"
http://www.python.org/dev/peps/pep-0306/

However, see "Integer Literal Support and Syntax" 
http://www.python.org/dev/peps/pep-3127/

(Basically in 2.6 and onwards you can use 0oNNN notation.)

> I'd really like 012 to be "12" and not "10".
>
> If I want an octal I'll use oct()!

But that gives you a string, you're asking about literals.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to