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 kbk, ppperry, roger.serwy, terry.reedy
Date 2015-05-21.07:02:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The two additional entries are the last two.  In this case, they are needed because KeyError pertains to the dict lookup in the last line "self.breaks[filename]".

Mistaken in this particular case or not, the deletion is intentional. Run.print_exception has these two lines:
    exclude = ("", "", "", "",
               "", "")
    cleanup_traceback(tbe, exclude)
The docstring for cleanup_traceback is "Remove excluded traces from beginning/end of tb; get cached lines".

The intent of the first 4 excludes is to make the tracebacks displayed in Idle for normal (non-debug) code the same as with Python, without Idle.  The intent of the last 2 is to continue the equivalence when using the Idle debugger (which inherits from

Using pdb with Idle is known to be somewhat problematical because Idle revises the execution environment.  In particular, identical tracebacks cannot be guaranteed.  (I tried to find the issue bug the buggy tracker search did not return the issue.)

A fix for this particular example would be to omit/remove bdb from exclude (which could be a set) when the first item contains 'pdb'.  I would consider a patch to do that.
Date User Action Args
2015-05-21 07:02:56terry.reedysetrecipients: + terry.reedy, kbk, roger.serwy, ppperry
2015-05-21 07:02:56terry.reedysetmessageid: <>
2015-05-21 07:02:56terry.reedylinkissue24252 messages
2015-05-21 07:02:55terry.reedycreate