<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

It's just too bad that 'with' doesn't support multiple separate "x as y" clauses.<br>
</blockquote>
<br></div>
The developers already agreed with you ;-).<br>
<br>
"With more than one item, the context managers are processed as if multiple with statements were nested:<br>
<br>
with A() as a, B() as b:<br>
    suite<br>
is equivalent to<br>
<br>
with A() as a:<br>
    with B() as b:<br>
        suite<br>
Changed in version 3.1: Support for multiple context expressions.<br>
"<br></blockquote><div><br></div><div>Doh! I hadn't noticed that. Alas, I'm /just barely now/ moving to Python 2.5, I won't be able to even consider getting near Python 3 for -- a year or so, I'm expecting. If ever!</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
(I suspect this will also be in 2.7)<br></blockquote><div><br></div><div>Ah, that's a beacon of hope.</div><div><br></div><div>--S</div></div>