[Python-Dev] Bare except clauses in PEP 348
Guido van Rossum
gvanrossum at gmail.com
Thu Aug 25 04:02:00 CEST 2005
On 8/24/05, Brett Cannon <bcannon at gmail.com> wrote:
> Is there any desire for a __future__ statement that makes it a syntax
> error? How about making 'raise' statements only work with objects
> that inherit from BaseException?
I doubt it. Few people are going to put a __future__ statement in to
make sure that *don't* use a particular feature: it's just as easy to
grep your source code for "except:". __future__ is in general only
used to enable new syntax that previously has a different meaning.
Anyway, you can make it an error globally by using the -W option creatively.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev