I'm all for clear and helpful error messages, but this feels a tad too
verbose (and even a bit patronizing) to me. But the highlighting of
character look-alikes is very helpful.

Perhaps something like:

"""
SyntaxError: invalid character in identifier
    -->2:   print(“Squares:”)
                  ^
An identifier contains one or more unallowed Unicode characters.
It is likely the "curly quote" unicode quotation mark, rather than
the required ASCII single or double quote was used for a string.
"""

I'm assuming that this would detect some of the common "look alikes" and
give a specific suggestion as above.

Keep in mind that anyone coding Python is going to see a LOT of
SyntaxErrors -- we don't need to present a message as though they've never
seen such an error before. But it IS helpful to point out errors that are
hard to see with a glance at the code.

-CHB

-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/J3ZYNUDTYEJJ6QSBVAAQKS5IISHR6XQY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to