change Python error messages for continued lines?

Discussion in 'Python' started by beliavsky@aol.com, Jul 8, 2004.

  1. Guest

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

    x = 1
    print x,\
    y

    produces output

    1
    Traceback (most recent call last):
    File "xerr.py", 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.
     
    , Jul 8, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lloyd Dupont
    Replies:
    1
    Views:
    362
    Lloyd Dupont
    Sep 30, 2004
  2. Lloyd Dupont
    Replies:
    1
    Views:
    429
    Guest
    Dec 22, 2004
  3. Martyn Quick
    Replies:
    1
    Views:
    295
    Kevin Walzer
    Jan 27, 2005
  4. Xah Lee
    Replies:
    75
    Views:
    1,215
    John Bokma
    May 13, 2005
  5. Xah Lee
    Replies:
    27
    Views:
    360
    John Bokma
    May 13, 2005
Loading...

Share This Page