Advertisement
socek

Untitled

Jan 12th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. from decorator import decorator
  2.  
  3.  
  4. def deco(func):
  5.     def wrapper(func, *args, **kwargs):
  6.         with ContextManager as something:
  7.             return func(*args, something, **kwargs)
  8.  
  9.     return decorator(wrapper, func)
  10.  
  11.  
  12. class TestSomething(object):
  13.  
  14.     @deco
  15.     def elo(self, something):
  16.         pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement