[Python-ideas] Generator-based context managers can't skip __exit__

Ethan Furman ethan at stoneleaf.us
Sun Nov 6 21:27:24 EST 2016


On 11/06/2016 12:18 AM, Ram Rachum wrote:

> Well, you think it's weird that I want a `finally` clause to not be called
>  in some circumstances.

Yes I (we) do.

>  Do you think it's equally weird to want an `__exit__` method that is not
>  called in some circumstances?

Yes I (we) do.

--
~Ethan~


More information about the Python-ideas mailing list