4 ms·
They are a form of metaprogramming, but other than decorators, Python generally discourages other kinds of metaprogramming. Metaclasses are reserved for very sp
by rudolf0 11y ago
They 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.