Quoting Barry Warsaw <barry at python.org>: > > At 08:21 PM 9/30/04 +1000, Nick Coghlan wrote: > > >However, another possibility occurred to me: > > > > > >try: > > > # Do stuff > > >except sys.special_exceptions: > > > raise > > >except: > > > # Deal with all the mundane stuff > > +0, except that I'd rather see it put in the exceptions module and given > a name in builtins. Hmm, I forgot about the existence of the exceptions module. I agree that makes a more sensible location than sys. As for it being a builtin, I have no objections to that. I'll come up with two patches, though. One to create the tuple in exceptions, and one to give it a name in builtins (since the latter would presumably be more controversial, like any new builtin). My current list of exceptions for inclusion is KeyboardInterrupt, MemoryError, SystemExit & StopIteration. The inclusion of StopIteration is what makes me prefer 'special_exceptions' as the name of the tuple, rather than 'critical_exceptions'. Cheers, Nick. -- Nick Coghlan Brisbane, Australia
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