On 2020-05-11 09:21, Chris Angelico wrote:
On Mon, May 11, 2020 at 6:09 PM Steve Barnes GadgetSteve@live.co.uk wrote:
Actually, in the case of the “wrong quotes” it puts the pointer under the character before the space character or at the end of the line (if you have a fixed spacing font – worse if you don’t) – it still doesn’t tell you which character is invalid.
This is actually a good point. Having an invalid character in an identifier shows the caret at the end of the identifier, regardless of where in the identifier the error is. That's something that could be improved on, regardless of the quote issue. There's a new parser on its way (PEP 617), so it'd be something to consider on that basis.
I wouldn't object if the syntax error reported that, say, the wrong type of quote was being used and included something like: Do you mean "?
Wrong kind of quote (not "). Wrong kind of hyphen or minus (-). Etc.