Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from decorator import decorator
- def deco(func):
- def wrapper(func, *args, **kwargs):
- with ContextManager as something:
- return func(*args, something, **kwargs)
- return decorator(wrapper, func)
- class TestSomething(object):
- @deco
- def elo(self, something):
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement