[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal

Georg Brandl g.brandl at gmx.net
Thu Mar 15 09:47:06 CET 2007


Thomas Wouters schrieb:
> 
> 
> On 3/15/07, *Raymond Hettinger* <python at rcn.com <mailto:python at rcn.com>> 
> wrote:
> 
>     My worry focuses on new-timers and SyntaxErrors. The worst part of
>     the new user experience is encountering a SyntaxError.
> 
> 
> Please. I already said it would be a SyntaxError *with explanation*. 
> It's pretty easy to make a syntax error that goes "Did you mean 0t6065 
> or 6065?". This would not be a syntax error handled by the parser, the 
> tokenizer really doesn't care about leading 0's and ast.c's parsenumber 
> (which would be the spot to raise it) has all the necessary information.

Until now, I skipped the octal thread. Now I read this and wondered, "what the
hell is 0t6065 supposed to mean" and only from the context I gathered that it
would be an octal literal...

Seriously, nobody, even coming from another language, will be able to look at it
and say, "yes, that's an octal literal."

Georg



More information about the Python-3000 mailing list