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.

Author terry.reedy
Recipients Dennis Sweeney, aroberge, epaine, miss-islington, pablogsal, shreyanavigyan, terry.reedy
Date 2021-05-08.01:00:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620435605.59.0.127072592065.issue44026@roundup.psfhosted.org>
In-reply-to
Content
Merged to 3.11.0a0 first, bot forget to post it.

Dennis, thank you for the analysis and then the suggestion as to how to access the not directly accessible.  It would likely have been awhile before I stumbled from 'cannot' to 'can with workaround'.  Feel free to add ideas on other IDLE issues.

Thanks EP for making the fix work even with chained exceptions *and* for providing tests.  I redid half the lines, but core test logic was correct and remains.  In .0b1+ repository (and future .0b2 release) IDLE:

>>> try: abc
... except NameError: f"{complex.reel(1+1j)} errors occurred!"
... 
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    try: abc
NameError: name 'abc' is not defined. Did you mean: 'abs'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<pyshell#2>", line 2, in <module>
    except NameError: f"{complex.reel(1+1j)} errors occurred!"
AttributeError: type object 'complex' has no attribute 'reel'. Did you mean: 'real'?

And thank you Pablo for making exception messages more helpful.
History
Date User Action Args
2021-05-08 01:00:05terry.reedysetrecipients: + terry.reedy, aroberge, pablogsal, miss-islington, Dennis Sweeney, epaine, shreyanavigyan
2021-05-08 01:00:05terry.reedysetmessageid: <1620435605.59.0.127072592065.issue44026@roundup.psfhosted.org>
2021-05-08 01:00:05terry.reedylinkissue44026 messages
2021-05-08 01:00:04terry.reedycreate