Raymond Hettinger 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.
One thing I assumed was that _if_ bare excepts were kept, they would still
only be allowed as the last except clause.
That is, this example:
> try: ...
> except: ... # A bare except in the middle. WTF?
> except (KeyboardInterrupt, SystemExit): ...
would still be a syntax error, even if bare excepts were allowed.
I still have some qualms about the idea of a bare except that doesn't catch
everything (I'd prefer to see them gone altogether), but I don't mind quite as
much if the above code stays as a syntax error.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.blogspot.com
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com