> > It's just too bad that 'with' doesn't support multiple separate "x as y" >> clauses. >> > > The developers already agreed with you ;-). > > "With more than one item, the context managers are processed as if multiple > with statements were nested: > > with A() as a, B() as b: > suite > is equivalent to > > with A() as a: > with B() as b: > suite > Changed in version 3.1: Support for multiple context expressions. > " >
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! (I suspect this will also be in 2.7) > Ah, that's a beacon of hope. --S
-- http://mail.python.org/mailman/listinfo/python-list