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/2007-December/075522.html below:

[Python-Dev] Problems with GeneratorExit deriving from Exception

[Python-Dev] Problems with GeneratorExit deriving from ExceptionBrett Cannon brett at python.org
Sun Dec 2 22:56:46 CET 2007
On Dec 1, 2007 11:14 PM, Chad Austin <chad at imvu.com> wrote:
> Guido van Rossum wrote:
> > On Dec 1, 2007 2:38 PM, Chad Austin <chad at imvu.com> wrote:
> >> This problem could be solved in several ways:
> >>
> >> 1) Make GeneratorExit derive from BaseException, just like SystemExit.
> >
> > Well argued. I suggest to go for option (1) -- make GeneratorExit
> > inherit from BaseException. We can do this starting 2.6. Feel free to
> > upload a patch to bugs.python.org.
>
> Great!  Patch is uploaded at http://bugs.python.org/issue1537
>
> The patch changes the definition of GeneratorExit so that it extends
> BaseException, adds a generator test, updates exception_hierarchy.txt, and
> updates the exceptions page in the documentation.  This is my first patch to
> Python -- did I miss anything?

I have not looked at the patch, so take what I say with a grain of salt.  =)

First, a generator test is not necessary.  The patch changes the
inheritance of exceptions, nothing more.  While its usefulness is
manifested for generators, this is really an exception detail.  And
changing exception_hierarchy.txt gives you the exception test you
need.

Second, the docs will need to be changed.  I know that
Doc/library/exceptions.rst needs a tweak.  Not sure if anywhere else
does.

-Brett
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