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 | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.blogspot.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4