Raymond Hettinger added the comment:

FYI, the two are not equivalent.   A bare except is equivalent to 
BaseException.  Even then, the new code would be slower than the original, so 
I'm not sure this change should be made at all (it makes the code more verbose, 
slower, and risks introducing a semantic change).

Also, Guido traditionally tries to discourage across the board changes like 
this.  Instead, we aim for "holistic refactoring" where code improvements are 
being made one module at a time by someone who deeply groks the code and is 
thinking through all the changes.  The problem with across-the-board edits is 
that they tend to be very shallow "change thing x to thing y" without looking 
at what the surrounding code is doing or whether the code ever made sense in 
the first place.

Another part of the risk of semantic change is that we likely do not have 
specific tests for Exception vs BaseException so it would be easy to make a 
mistake and not have the test suite catch it.

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21259>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to