April 2018
Intermediate to advanced
408 pages
10h 42m
English
To create more complex functions, Python allows the following kinds of commands:
@f_wrap
@g_wrap
def h(x):
something
There's nothing in Python to stop us from stacking up decorators that modify the results of other decorators. This has a meaning somewhat like
. However, the resulting name will be merely
. Because of this potential confusion, we need to be cautious when creating functions that involve deeply nested decorators. If our intent is simply to handle some cross-cutting concerns, then each decorator ...