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 ppperry, terry.reedy
Date 2018-09-23.21:15:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537737349.11.0.956365154283.issue34779@psf.upfronthosting.co.za>
In-reply-to
Content
The baseline for what should happen is what does happen in interactive python.exe.

>>> class N:
...   def __repr__(self): raise ValueError
...
>>> N()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in __repr__
ValueError

IDLE's Shell very intentionally improves on this by including the code, which would be present if one ran the code from a file.  This is most definitely not a bug.

idlelib.run.cleanup_traceback removes internal items from the beginning and end of tracebacks (as long as something is left) but intentionally leaves them in the middle, as they may add useful information.  (Situations like this are rare.)  This is also not a bug.  These details are not part of the language definition.

In this case, I think the extra line will on net be informative to beginners.  But even if you disagree, there is no way for code to decide.  I cannot imagine what else you think is 'wrong'.
History
Date User Action Args
2018-09-23 21:15:49terry.reedysetrecipients: + terry.reedy, ppperry
2018-09-23 21:15:49terry.reedysetmessageid: <1537737349.11.0.956365154283.issue34779@psf.upfronthosting.co.za>
2018-09-23 21:15:49terry.reedylinkissue34779 messages
2018-09-23 21:15:49terry.reedycreate