Message154916
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. |
|
Date |
User |
Action |
Args |
2012-03-05 00:15:16 | Simon.Chopin | set | recipients:
+ Simon.Chopin |
2012-03-05 00:15:16 | Simon.Chopin | set | messageid: <1330906516.74.0.432612109172.issue14196@psf.upfronthosting.co.za> |
2012-03-05 00:15:16 | Simon.Chopin | link | issue14196 messages |
2012-03-05 00:15:15 | Simon.Chopin | create | |
|