Jeremy Hylton wrote: > The current exception hierarchy isn't too far from what you suggest. > We just got the names wrong. That is, there is a base class, > StandardException, that captures most exceptions other than > MemoryError, SystemError, and KeyboardInterrupt. If we renamed that > Exception, then we'd be 90% of the way there. You could also change > your code, right now, to say "except StandardError:" and avoid the > problem entirely. when was that changed? Python 2.4a3 (#1, Sep 3 2004, 11:32:03) >>> StandardException Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'StandardException' is not defined >>> StandardError <class exceptions.StandardError at 0x401a329c> >>> issubclass(MemoryError, StandardError) True >>> issubclass(KeyboardInterrupt, StandardError) True >>> issubclass(SystemExit, StandardError) False >>> issubclass(StopIteration, StandardError) False >>> issubclass(ImportError, StandardError) True </F>
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