On 3/14/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Raymond Hettinger wrote: > > > 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 > > This seems like an argument for producing more informative > error messages. Something like > > Syntax error: Numeric literal with leading zeroes is > ambiguous. Use 0t123 for an octal literal, or omit the > leading zeroes for a decimal literal. > > should make it pretty clear what the problem is and > how to fix it.
What, you don't like: >>> 09 File "<stdin>", line 1 09 ^ SyntaxError: invalid token I can't imagine why :) Raymond makes a very good point that syntax errors are the bane of newbies. When I started using Python, I was very impressed with the accuracy and utility of the exception system. It may be that most experienced programmers have similar feelings, so it would seem that nobody has turned a critical eye on the reporting of errors to nervous first-time programmers who are already worried they are going to break the machine. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com