change Python error messages for continued lines?

beliavsky at beliavsky at
Thu Jul 8 22:01:26 CEST 2004

I have noticed a quirk of Python error messages that I think should be
The code

x = 1
print x,\

produces output 

Traceback (most recent call last):
  File "", line 2, in ?
    print x,\
NameError: name 'y' is not defined

which is confusing at first because 'print x,\' does not contain a
'y'. When a Python error message prints a line that spans more than
one line of text, I think the entire line should be printed.

More information about the Python-list mailing list