3 ms·
It might help to show the same examples from that module's documentation, how they are similar or different. I still don't understand this after a skim of your
by abecedarius 13y ago
It might help to show the same examples from that module's documentation, how they are similar or different.
I still don't understand this after a skim of your post, since one example has
@decorator
def some_decorator(func, args, kwargs):
while the next goes
@decorator
def some_decorator(call):
Does this introspect on the parameters of some_decorator?
FWIW I'm happy enough with https://github.com/darius/sketchbook/blob/master/misc/decorator.py https://github.com/darius/sketchbook/blob/master/misc/decora...
- Suor 13y agoThe first part of a post is mere reasoning showing how I got to the actual interface I use. @decorator works with `call` not with `func, args, *kwargs`.
- abecedarius 13y agoAh, OK. So there's no way to express an example that needs to get at func, etc.? I think I'd separate out an @decorator that fixes the metadata on the returned function, and another one, using it, that makes a decorator that works on the call() interface.