[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal
Raymond Hettinger
python at rcn.com
Thu Mar 15 01:26:27 CET 2007
[GvR]
>I agree with Thomas that allowing the literal 0012 in a program to
>return the value 10 would trip up old-timers too easily.
Did you mean "return the value 12 when 10 was intended"?
My worry focuses on new-timers and SyntaxErrors. The worst part of the new user experience is encountering a SyntaxError. Because of the way we generate them, invalid syntax errors are not very informative and it is not always self-evident how to fix them. I don't think we're helping the language by adding a new special rule (lead zeros are okay on floats and decimals but not ints) that results in a new source of SyntaxErrors. IMO, Py3.0 would be cleaner with 0012 being 12 and not raising a SyntaxError.
Raymond
More information about the Python-3000
mailing list