On Tue, 07 Sep 2004 09:43:53 -0400, Jim Fulton <jim at zope.com> wrote: > Jeremy Hylton wrote: > > ... > > > I > > think it would be easier in principle to put them at a different place > > in the class hierarchy than to make them some special kind of > > uncatchable exception. > > Note that we don't want uncatchable exceptions. Rather, we want > exceptions that aren't caught by bare excepts or very broad > excepts. In many cases, we want certain knowledgeable code to be able > to catch these exceptions. I agree with half the cause. There ought to be a decent organization of the exception class hierarchy so that exceptions like KeyboardInterrupt are in a special category. Then an "except NormalError:" <wink> would catch only the normal errors and not the special ones. I don't think bare exception should change it's meaning; you just shouldn't use it unless it's *really* what you mean. I think backwards compatibility is a really hard issue for any of these changes. It's probably hard to re-arrange the class hierarchy, but I don't know what practical solution there is to these problems that doesn't involve breaking some code. It's even harder to change bare except, but I don't think that's necessary. Jeremy
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