Open IDLE, New File, put this inside:
'abcde\
')
x = 123456789
And try to Run Module. Of course, the syntax error is extra ) at the end of the second line. But it is not highlighted. What's highlighted is 123 in the third line. Some additional observations:
* the length of the first line determines somehow what's highlighted in the third one: the longer the first line, more to the right the highlight goes in the third;
* third line can be whatever you want, it just needs to be long enough for a highlight to appear;
* you can even have blank lines between them;
* the same phenomenon appears if you use triple-quoted strings instead of single-quoted with backslash line continuation. |