[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

Andrei Kulakov report at bugs.python.org
Wed Oct 20 10:47:17 EDT 2021


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Joe: I understand your point but my concern is that this creates an impression for the users that Python is tolerant of failing __repr__'s, while that's not the case at all.

I agree that if StackSummary was only used for interactive debugging, there would be a stronger case for it to nicely handle failed __repr__; but I think the more important use for it is non-interactive.

The argument on the other issue was that exceptions should bubble up and we can't assume that user wants them silenced, that's the decision for user to make. I agree with that; -- and your proposed change does not address it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43656>
_______________________________________


More information about the Python-bugs-list mailing list