[issue14196] Unhandled exceptions in pdb return value display
Simon Chopin
report at bugs.python.org
Mon Mar 5 01:15:16 CET 2012
New submission from Simon Chopin <chopin.simon at gmail.com>:
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.
----------
components: Library (Lib)
messages: 154916
nosy: Simon.Chopin
priority: normal
severity: normal
status: open
title: Unhandled exceptions in pdb return value display
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14196>
_______________________________________
More information about the Python-bugs-list
mailing list