Message154916
| 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: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 |
|