[issue1574217] isinstance swallows exceptions
Benjamin Peterson
report at bugs.python.org
Sat May 17 00:30:29 CEST 2008
Benjamin Peterson <musiccomposition at gmail.com> added the comment:
I'd like to clarify the approach to fixing these types of problems. I
fixed a issue (#2196) like this by only propagating exceptions that
didn't descend from Exception because of this sentence in the hasattr docs:
This is implemented by calling getattr(object, name) and seeing whether
it raises an exception or not.)
However, I like constricting it to AttributeError only as that would
make it much less confusing. This might be something to bring up on
python-dev.
_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1574217>
_____________________________________
More information about the Python-bugs-list
mailing list