
2 May
2016
2 May
'16
1:41 p.m.
On 2016-05-02 14:57, Koos Zevenhoven wrote:
On Mon, May 2, 2016 at 3:44 PM, Alexander Walters tritium-list@sdamon.com wrote:
with open(foo), open(bar): .write(baz) # does what?
Hopefully it would raise an exception, even though, in the spirit of May 1st, it would pick one of the two files at random ;-).
This:
with open(foo), open(bar): .write(baz) # does what?
is basically just a shorter way to write this:
with open(foo): with open(bar): .write(baz) # does what?
so that suggests that it would pick the last one.
Anyway, the exception (or warning?) could be raised at compile-time if the leading-dot form was used in a 'with' that had more than one expression.