0
votes

Let's say I have a function:

@some_authorization
def to_call():
  pass

Now, I want to call this to_call() function, but don't want that wrapper function @some_authorization get executed. How to achieve this scenario?

Make 2 different methods. - matszwecja
some_authorization is not performed when you run the function: that is done at interpreter time. It is what is returned by the decorator that each time runs when you call to_call. - Willem Van Onsem