[Python-ideas] with None (Was: Re: Enhanced context managers with ContextManagerExit and None)
Antoine Pitrou
solipsis at pitrou.net
Tue Aug 13 17:32:47 CEST 2013
Le Tue, 13 Aug 2013 17:29:38 +0200,
Masklinn <masklinn at masklinn.net> a écrit :
> Furthermore:
>
> On 2013-08-13, at 16:48 , Serhiy Storchaka wrote:
> >
> > And when the with statement will support None as a "null-manager":
>
> I think that is a terrible idea, and will be a source of woe and bugs
> more than a solution to anything.
I agree. I'd rather have a null_manager() in contextlib, designed
expressly for this purpose.
Regards
Antoine.
More information about the Python-ideas
mailing list