Skip to content

Tag: decorator

How to obtain parameters from decorated imported function?

i’d like to obtain the parameter from the decorated function. It’s a lil bit different from the usual one. Here is the code output: i need fetch: context, 1,2,3(parameters in test_function) in remotable_timer i know the code below can be a potential way to achieve it, but i have to decorate remota…

How to pass self attributes to a decorator?

I have a decorator for an object method: I want to add another level of wrapping around this to allow parameters: Now, what I want to be able to do is pass a self attribute as a wrapper parameter, i.e. call it with something like this I see 2 options: make self._foo global don’t pass self._foo, and make…