[Python-ideas] Enhanced context managers with ContextManagerExit and None

Ethan Furman ethan at stoneleaf.us
Tue Aug 13 16:42:53 CEST 2013


On 08/13/2013 04:55 AM, Kristján Valur Jónsson wrote:
>
> But I agree that None is problematic for the reason you demonstrate, and did consider that.  I’m suggesting it here as a
> demonstration of the concept, and also to reduce the need for yet another built-in.  Perhaps the ellipsis could be used,
> that’s everyone’s favourite singleton :)

Heh.

How about NotImplemented?

--
~Ethan~


More information about the Python-ideas mailing list