On Mon, Nov 18, 2019, at 12:59, Paul Moore wrote:
On Mon, 18 Nov 2019 at 17:55, Random832 <random832@fastmail.com> wrote:
This particular chain of discussion is regarding a proposal to solve the problem posed in the original topic by using a parenthesized tuple display, i.e. code that looks like the following:
with (open(filename1), open(filename2)) as (file1, file2):
Thanks. I'm still not convinced that's a "problem" that needs solving - backslashes are a little ugly but fine IMO. But I now understand the discussion in this subthread, so thanks for that. Paul
I think in a broader sense it does raise a question of "if it's okay for functions like open to be like this, why have __enter__ at all?" - but the barn door's been open nearly a decade on that.