KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I pass a class field to a decorator on a class method as an argument? What I want to do is something like: class Client(object): def __init__(self, url): self.url = url @check_authorization("some_attr", self.url) def get(self): do_work() It complains that self does not exist for passing self.url to the decorator. Is there a way around this?
Tags (comma-separated)
Save Edits
Cancel