Hi,

I'm using Michele S's decorator-module to create decorators with matching
signatures, for better error-catching.

However, I now want to enrich the signature of a generic wrapper so that the
new function will accept more parameters (keyword only). These additional
parameters are consumed by the wrapper and not passed to the decorated
function.

So something like this would be cool:

@enriched_decorator("bar")
def some_decorator(f, **args, **kwargs):
    bar = kwargs.pop("bar")
    return f(**args, **kwargs)

Anybody has done something like this?

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to