This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# methods can be used as decorators | |
class A: | |
def awesome(method): | |
def wrapped(self, *args, **kwargs): | |
# do whatever you want | |
return method(self, *args, **kwargs) | |
return wrapped | |
@awesome | |
def some_method(self, *args, **kwargs): |