3 ms·
That seems like a pretty fair label for what decorators do.
by chc 11y ago
That seems like a pretty fair label for what decorators do.
- rudolf0 11y agoThey are a form of metaprogramming, but other than decorators, Python generally discourages other kinds of metaprogramming. Metaclasses are reserved for very specific use-cases, and monkey patching or re-opening class definitions are almost always considered anti-patterns.