On Jan 30, 12:23 pm, Stephen Hansen <me+list/pyt...@ixokai.io> wrote:
> --- start > from contextlib import contextmanager > > class Item(object): pass > > deeply = Item() > deeply.nested = Item() > deeply.nested.thing = Item() > > @contextmanager > def my(thing): > yield thing > > with my(deeply.nested.thing) as o: > o.hello = 1 > > print deeply.nested.thing.hello > --- end Well congratulations Stephen, you win the obfuscation prize of the year! -- http://mail.python.org/mailman/listinfo/python-list