[Python-Dev] Bare except clauses in PEP 348

Guido van Rossum gvanrossum at gmail.com
Wed Aug 24 03:30:20 CEST 2005


On 8/23/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> The latest version of PEP 348 still proposes that a bare except clause
> will default to Exception instead of BaseException.  Initially, I had
> thought that might be a good idea but now think it is doomed and needs
> to be removed from the PEP.

If we syntactically enforce that the bare except, if present, must be
last, would that remove your objection? I agree that a bare except in
the middle is an anomaly, but that doesn't mean we can't keep bare
except: as a shorthand for except Exception:.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list