Skip to content

Instantly share code, notes, and snippets.

# 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):