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 Simon.Chopin
Recipients Simon.Chopin
Date 2012-03-05.00:15:15
SpamBayes Score 3.0975222e-13
Marked as misclassified No
Message-id <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za>
In-reply-to
Content
This issue occurred at least in Python 2.7, I haven't checked in other versions.

When stepping on a return statement, pdb calls the return value __str__() method to display it at the end of the line. Only, it doesn't handle the potential exceptions raised within those functions.

An exemple would be:
import pdb

class A(object):
    def __new__(cls):
        pdb.set_trace()
        return super(A, cls).__new__()
    def __init__(self):
        self.value = "Foo"
    def __str__(self):
        return self.value

pdb.run("A()")

When using the step by step, pdb will be interrupted by an unhandled AttributeError.
History
Date User Action Args
2012-03-05 00:15:16Simon.Chopinsetrecipients: + Simon.Chopin
2012-03-05 00:15:16Simon.Chopinsetmessageid: <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za>
2012-03-05 00:15:16Simon.Chopinlinkissue14196 messages
2012-03-05 00:15:15Simon.Chopincreate