Aahz wrote: > > Also maybe start issuing warnings whenever you inherit directly from > > Exception. > > -1 -- I occasionally use exceptions as a multi-loop break. That's a > perfectly valid Python practice, those exceptions should inherit from > Exception, and there should not be any warnings raised. There probably should be a ControlFlowException category for these that would also include StopIteration and GeneratorExit. I don't think it should include *all* exceptions other than Errors or Warnings, though. SystemExit and KeyboardInterrupt remain two things that you will almost always not want to catch, even in a top-level catch-almost-everything loop. So I'd leave these two out on their own. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiam! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing at canterbury.ac.nz +--------------------------------------+
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