[Nick Coghlan] > As others have pointed out, GeneratorExit and StopIteration should never > reach > the job execution loop - if they do, there's a bug in the job, and they > should > be caught and logged. Please read my other, detailed post on this (8/5/2005 4:05pm). It is a mistake to bypass control flow exceptions like GeneratorExit and StopIteration. Those need to remain under Exception. Focus on your core use case of eliminating the common idiom: try: block() except KeyboardInterrupt: raise except: pass # or some handler/logger In real code, I've never seen the above idiom used with StopIteration. Read Guido's note and my note. There are plenty of valid use cases for a bare except intending to catch almost everything including programming errors from NameError to StopIteration. It is a consenting-adults construct. Your proposal breaks a major use case for it (preventing your sales demos from crashing in front of your customers, writing fault-tolerant programs, etc.) Raymond
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