[Python-Dev] GeneratorExit inheriting from Exception

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 19 02:49:32 CET 2006


Barry Warsaw wrote:

> Exception
> +- KeyboardInterrupt
> +- GeneratorExit
> +- SystemExit
> +- StopIteration
> +- Error
> |  +- ImportError
> |  +- (etc.)
> |
> +- Warning
>    +- UserWarning
>    +- (etc.)

+42! This is beautifully clear and simple, especially
compared to some of the other exception hierarchy
reorganisations that have been proposed.

Greg


More information about the Python-Dev mailing list