5 ms·
> Python allows you to get pretty creative with the code you’re writing. For instance, you can: Use MetaClasses to self-register classes upon code initiali
by smitty1e 4y ago
> Python allows you to get pretty creative with the code you’re writing. For instance, you can:
Use MetaClasses to self-register classes upon code initialization
Swap out True and False
Add functions to the list of built-in functions
Overload operators via magic methods
Use functions as properties via the @property decorator
These features are fun to play around with but, as most programmers will agree, they often make the code harder to understand when reading someone else’s work.
---
Who actually does any of that, particularly at the office?
No one has the time for shenanigans.