File size: 1,462 Bytes
065fee7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
import wrapt # https://pypi.python.org/pypi/wrapt
import decorator # https://pypi.python.org/pypi/decorator
def function1():
pass
def wrapper2(func):
def _wrapper2(*args, **kwargs):
return func(*args, **kwargs)
return _wrapper2
@wrapper2
def function2():
pass
@wrapt.decorator
def wrapper3(wrapped, instance, args, kwargs):
return wrapped(*args, **kwargs)
@wrapper3
def function3():
pass
@decorator.decorator
def wrapper4(wrapped, *args, **kwargs):
return wrapped(*args, **kwargs)
@wrapper4
def function4():
pass
class Class(object):
def function1(self):
pass
@classmethod
def function1cm(cls):
pass
@staticmethod
def function1sm():
pass
@wrapper2
def function2(self):
pass
@classmethod
@wrapper2
def function2cmi(cls):
pass
@staticmethod
@wrapper2
def function2smi():
pass
@wrapper3
def function3(self):
pass
@wrapper3
@classmethod
def function3cmo(cls):
pass
@classmethod
@wrapper3
def function3cmi(cls):
pass
@wrapper3
@staticmethod
def function3smo():
pass
@staticmethod
@wrapper3
def function3smi():
pass
@wrapper4
def function4(self):
pass
@classmethod
@wrapper4
def function4cmi(cls):
pass
@staticmethod
@wrapper4
def function4smi():
pass
|