[Python-Dev] PEP 409 - final?

Tim Delaney timothy.c.delaney at gmail.com
Thu Feb 2 01:44:24 CET 2012


On 2 February 2012 11:18, Ethan Furman <ethan at stoneleaf.us> wrote:

> Implementation questions for the __NoException__ route:
>
> 1) Do we want double underscores, or just a single one?
>
>   I'm thinking double to mark it as special as opposed
>   to private.
>

Double and exposed allows someone to explicitly the __cause__ to
__NoException__ on an existing exception.


> 2) This is a new exception class -- do we want to store the
>   class itself in __context__, or it's instance?  If its
>   class, should we somehow disallow instantiation of it?
>
> 3) Should it be an exception, or just inherit from object?
>   Is it worth worrying about somebody trying to raise it, or
>   raise from it?
>

If it's not actually an exception, we get prevention of instantiation for
free. My feeling is just make it a singleton object.


> 4) Is the name '__NoException__' confusing?


Seems perfectly expressive to me so long as it can't itself be raised.

Tim Delaney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120202/32935e28/attachment.html>


More information about the Python-Dev mailing list