brasse wrote: > with nested(Foo('a'), Foo('b', True)) as (a, b): > print a.tag > print b.tag
If been watching this thread for a while, and I think that your problems will go away if you write actual nested with-blocks: with Foo("a") as a: with Foo("b") as b: print a.tag print b.tag Why look for a complex solution if there is a simple one? Peter -- http://mail.python.org/mailman/listinfo/python-list