[issue2291] Catching all exceptions with 'object'

Brett Cannon report at bugs.python.org
Sun Mar 16 17:53:04 CET 2008

Brett Cannon <brett at python.org> added the comment:

Actually, if you go back to 2.4, before BaseException even existed, a
try/except with a new-style class in the 'except' clause was also
possible. Actual enforcement of what can be in an 'except' clause is a
new thing added by PEP 352. Suddenly making this any more than a warning
will be too aggressive. And the PEP already stated the transition path.

As I said, I have no problem speeding up PendingDeprecationWarnings in
2.6 and adding Py3K warnings now, but anything more severe in 2.6 (i.e.,
a DeprecationWarning flat-out) would require python-dev approval.

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list