1 Nov
2012
1 Nov
'12
4:47 a.m.
On Oct 31, 2012, at 3:38 AM, Barry Warsaw
IWBNI you could write it like this:
with (open('/etc/passwd') as p1, open('/etc/passwd') as p2): pass
This seems analogous to using parens to wrap long if-statements, but maybe there's some subtle corner of the grammar that makes this problematic (like 'with' treating the whole thing as a single context manager).
Of course, you can wrap with backslashes, but ick!
I would rather live a bashslash than have yet another change to the grammar or have context-manager semantics added to tuples. ISTM that this isn't a problem worth solving. Raymond