26 Mar
2009
26 Mar
'09
3:42 p.m.
On 3/26/2009 4:07 PM, Mathias Panzenböck wrote:
Good point. Maybe that would be better:
with a,b as c,d:
No. See Guido's reply. I was just trying to say that with nested(a,b) as c,d: is more readble than with a as c, b as d: which would argue against new syntax and better documentation of contextlib.nested. However, as the tuple (a,b) is built prior to the call to nested, new syntax is needed. It still does not hurt to put in parentheses for readability here: with (a as c), (b as d): Perhaps parentheses should be recommended in the documentation, even though they are syntactically superfluous here? Sturla Molden