2.2 features
Guido van Rossum
guido at python.org
Fri Aug 3 13:00:49 EDT 2001
Paul Prescod <paulp at ActiveState.com> writes:
> try:
> foo()
> except x in class ZeroDivisionError:
> bar()
That would be backwards incompatible. The expression in the except
clause is not an arbitrary Boolean -- it's an exception or a tuple of
exceptions. If you want to, you can propose a PEP to change this and
provide backwards compatible measures -- but I foresee plenty of
problems (e.g. where is 'x' defined?). The potential confusion here
seems a job for PyChecker to me.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list