A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-August/135807.html below:

[Python-Dev] Multiline with statement line continuation

[Python-Dev] Multiline with statement line continuation [Python-Dev] Multiline with statement line continuationMarko Rauhamaa marko at pacujo.net
Sat Aug 16 14:47:06 CEST 2014
Steven D'Aprano <steve at pearwood.info>:

> I simply don't care. They will try it, discover that tuples are not 
> context managers, fix their code, and move on.

*Could* tuples (and lists and sequences) be context managers?

*Should* tuples (and lists and sequences) be context managers?

> I don't think that some vague similarity between it and tuples is
> justification for rejecting the proposal.

You might be able to have it bothways. You could have:

   with (open(name) for name in os.listdir("config")) as files:
       ...


Marko
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4