LL
Size: a a a
LL
A
AP
A
AP
A
S
A
S
S
A
C
S
AP
def advisable(function):
advises = {'around': []}
def around(f, in_front=False):
if in_front:
advises['around'].insert(0, f)
else:
advises['around'].append(f)
def inner(*args, **kwargs):
for w in advises['around']:
function = w(function)
return function(*args, **kwargs)
inner.around = around
return inner
@advisable
def foo(x):
print(x)
foo.around(lambda f: lambda x: f(x * 2))
AP
LL
A
S
AK
A