On Sun, 2006-03-19 at 17:31 +1000, Nick Coghlan wrote: > With PEP 352 (tweaked to move GeneratorExit out from under Exception): > - "except:" continues to mean catch everything > - "except Exception:" now does the right thing > - inheriting from Exception continues to be correct for user exceptions > - errors may choose to inherit from one of the existing Errors instead > > With Barry's proposed hierarchy: > - "except:" continues to mean catch everything > - "except Exception:" continues to do the wrong thing > - all code has to change to do "except Error:" instead > - inheriting from Exception becomes incorrect for user exceptions > - all code has to change to inherit from Error instead > - non-error user exceptions (such as completion of a search using nested > loops) have no clear parent to inherit from (both Error and Exception > are wrong, albeit for different reasons. > > The additional pain required in order to have 'Exception' at the root of the > hierarchy just isn't worth it.
One quibble. Since the term used for the general concept of something that is raised and caught is "exception" and since all the raise-able objects live in a module called "exceptions", it is confusing that "except Exception" will not catch all exceptions. -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com