On Sat, Jan 24, 2015 at 11:55 AM, Chris Angelico <ros...@gmail.com> wrote: > That's still only able to assign to a key of a dictionary, using the > function name. There's no way to represent fully arbitrary assignment > in Python - normally, you can assign to a name, an attribute, a > subscripted item, etc. (Augmented assignment is a different beast > altogether, and doesn't really make sense with functions.) There's no > easy way to say "@stash(dispatch_table_a['asdf'])" and have that end > up assigning to exactly that.
Obviously, nobody will be happy until you can do: def call(*a, **kw): return lambda f: f(*a, **kw) @call() def x, y (): yield 1 yield 2 Actually, maybe not even then. -- Devin -- https://mail.python.org/mailman/listinfo/python-list