mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
15 lines
367 B
Python
15 lines
367 B
Python
def bar(f):
|
|
def wrapper(self, *args, **kwargs):
|
|
print('running {cls}.{method}'.format(cls=type(self).__name__,
|
|
method=f.__name__))
|
|
return f(self, *args, **kwargs)
|
|
return wrapper
|
|
|
|
|
|
class C(object):
|
|
@bar
|
|
def foo(self): # False positive: self is used by @bar
|
|
return 'foo'
|
|
|
|
|
|
C().foo() |