A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-August/055128.html below:

Exception Reorganization for Python 3.0

[Python-Dev] PEP, take 2: Exception Reorganization for Python 3.0 [Python-Dev] PEP, take 2: Exception Reorganization for Python 3.0Russell E. Owen rowen at cesmail.net
Wed Aug 3 22:35:24 CEST 2005
In article <bbaeab1005080217346b2af653 at mail.gmail.com>,
 Brett Cannon <bcannon at gmail.com> wrote:

> New Hierarchy
> =============
> 
> Exception
> +-- CriticalException (new)
>     +-- KeyboardInterrupt
>     +-- MemoryError
>     +-- SystemError
> +-- ControlFlowException (new)
>     +-- StopIteration
>     +-- GeneratorExit
>     +-- SystemExit
> +-- StandardError
>     +-- AssertionError
>     +-- SyntaxError
>         +-- IndentationError
>             +-- TabError
>     +-- UserException (rename of RuntimeError)
>     +-- ArithmeticError
>         +-- FloatingPointError
>         +-- DivideByZeroError
>         +-- OverflowError
>     +-- UnicodeError
>         +-- UnicodeDecodeError
>         +-- UnicodeEncodeError
>         +-- UnicodeTranslateError
>     +-- LookupError
>         +-- IndexError
>         +-- KeyError
>     +-- TypeError
>     +-- AttributeError
>     +-- EnvironmentError
> 	+-- OSError
> 	+-- IOError
> 	    +-- EOFError (new inheritance)
>     +-- ImportError
>     +-- NotImplementedError (new inheritance)
>     +-- NamespaceError (rename of NameError)
>         +-- UnboundGlobalError (new)
>         +-- UnboundLocalError
> 	+-- UnboundFreeError (new)
>     +-- WeakReferenceError (rename of ReferenceError)
>     +-- ValueError
> +-- Warning
>     +-- UserWarning
>     +-- AnyDeprecationWarning (new)
> 	+-- PendingDeprecationWarning 
>         +-- DeprecationWarning
>     +-- SyntaxWarning
>     +-- SemanticsWarning (rename of RuntimeWarning)
>     +-- FutureWarning

I am wondering why OSError and IOError are not under StandardError? This 
seems a serious misfeature to me (perhaps the posting was just 
misformatted?).

Having one class for "normal" errors (not exceptions whose sole purpose 
is to halt the program and not so critical that any continuation is 
hopeless) sure would make it easier to write code that output a 
traceback and tried to continue. I'd love it.

-- Russell

More information about the Python-Dev mailing list

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