1

I have been working on with decorators quite a while now , and have seen them in action in Django REST Framework (@api_view), and also In some of my own code. As for the definition and usage part I am clear that how it works. But I am interested to know if I can pass on an Object as argument to a Decorator.Also if we cannot then why we can't?

@my_decorator(my_object)
def my_func():
    return something
Atul Jain
  • 1,053
  • 11
  • 36

0 Answers0