[issue21259] replace "except: pass" by "except Exception: pass"
Raymond Hettinger
report at bugs.python.org
Thu Apr 17 05:02:23 CEST 2014
Raymond Hettinger added the comment:
Several areas for attention:
* Changes to the test suite probably should not be made
The user doesn't benefit in any way and you risk
unintentionally breaking the test suite in a way that
isn't obvious (we have no tests for the tests themselves
so changing tests is like refactoring without a safety net).
* Some of the exception handling in IDLE needs to catch
all exceptions (i.e. SystemExit and KeyboardInterrupt
are supposed to display tracebacks and not terminate
IDLE itself).
* Changing the exceptions in threading.py is worrisome.
* The Pdb debugger may have legitimate reasons to catch
all exceptions (like IDLE, we want don't want to
terminate the debugger itself).
In other words, many of the proposed changes should not
be made.
For the rest, be careful to not change semantics
unintentionally and consider adding tests if you think
there is a real bug. In cases where there is doubt
about the right thing to do, consider assigning the
original author or maintainer of the code.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21259>
_______________________________________
More information about the Python-bugs-list
mailing list