This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: make use of extended SyntaxError info.
Type: Stage: test needed
Components: IDLE Versions: Python 3.11, Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: aroberge, terry.reedy
Priority: normal Keywords:

Created on 2022-03-29 22:10 by terry.reedy, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg416302 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-03-29 22:10
In 3.10 and 3.11:

>>> while s := input.read(MAXBINSIZE):
...     while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)):
  File "<stdin>", line 2
    while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)):
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot use assignment expressions with expression

IDLE only colors the 'l' of 'len'; add extended marking.

Some other errors gained extended location in 3.11 (only, I believe).  Adding colors may require monkeypatching method or subclassing class in traceback.py.  May have commented on issue or PR.

Related: Put SyntaxError in box.  (Anyone really want log of error?)
msg416315 - (view) Author: Andre Roberge (aroberge) * Date: 2022-03-30 00:59
> (Anyone really want log of error?)

If by this you mean having access to the error from a known place (like sys.last_traceback or something else specific to IDLE but available from a script), then the answer from me is definitely yes.
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91312
2022-03-30 00:59:30arobergesetnosy: + aroberge
messages: + msg416315
2022-03-29 22:10:53terry.reedycreate