[Python-ideas] Automatic context managers

Andrew Svetlov andrew.svetlov at gmail.com
Fri Apr 26 21:30:18 CEST 2013


On Fri, Apr 26, 2013 at 9:54 PM,  <random832 at fastmail.us> wrote:
> What about a with expression?
>
> boolean = x.use() with x as open(resource)

interesting idea. I see nothing bad with proposed construction.
Any objections? I've miss something?

--
Thanks,
Andrew Svetlov



More information about the Python-ideas mailing list