On Mar 13, 10:19 am, Jon Clements <[email protected]> wrote:
> What I'd like to achieve is something similar to:
>
> @inject(B):
> def some_function(a, b):
> pass # something useful
So, just typing at the keyboard here, you mean something like:
class InjectClass(object):
def __init__(self, func, *args, **kw):
self.func = func
self.args = args
self.kw = kw
def __call__(self):
self.func(*self.args, **self.kw)
Or exactly what are you looking for?
Pat
--
http://mail.python.org/mailman/listinfo/python-list