Linking a JSON file might not be the best medium to share.
You must be trying to look at this on mobile. It’s linked to a Jupyter notebook which renders on desktop in the GitHub UI.
Ha that’s right!
tl;dr: Attaching a decorator @deco to foo’s definition is semantically equivalent to writing foo = deco(foo) after foo‘s definition. Multiple decorators attached to the same definition are applied in the reverse order in which they appear in the program text. The consequences of these two facts are exactly what you would expect if you already know the remainder of Python’s syntax and semantics.
foo = deco(foo)
True, but the article also makes the (harder!) case that using decorators in “creative” ways may not actually be a bad idea in all cases. I found it worth reading for that reason.
The article doesn’t make a very good case. The most “creative” snippets (22 and 23) are also the ugliest ones.
One good example of a “creative” decorator is in the contextlib package: @contextmanager takes a function and returns a callable object.