Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def bind_decorator(obj: Any, decorator: Any) -> None:
- methods = [
- method for method,
- _ in inspect.getmembers(obj, inspect.ismethod)
- ]
- for method in methods:
- setattr(obj, method, decorator(method))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement