Terry J. Reedy <[email protected]> added the comment:
Great!!! I also tried
>>> try: compile("a xyzjdkjfk", '', 'single')
except SyntaxError as e:
print(e, e.msg, e.lineno, e.offset, e.end_lineno, e.end_offset)
invalid syntax. Perhaps you forgot a comma? (, line 1) invalid syntax. Perhaps
you forgot a comma? 1 1 1 12
The language change that enables the display change is the addition of
end_lineno and end_offset attributes. I will look into using these in IDLE. I
will submit a PR to augment the What's New entry, so others can also improve
their error marking.
----------
nosy: +terry.reedy
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43914>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com