Re: [Python-Dev] Multiline with statement line continuation

2014年8月16日 14:44:06 -0700

On Sat, Aug 16, 2014 at 10:47 PM, Marko Rauhamaa <[email protected]> wrote:
>
> You might be able to have it bothways. You could have:
>
> with (open(name) for name in os.listdir("config")) as files:
But that's not a tuple, it's a generator. Should generators be context
managers? Is anyone seriously suggesting this? I don't think so. Is
this solutions looking for problems?
ChrisA
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to