3 ms·
I used to think they were ugly too, until I wrote a Python library which made heavy use of overloaded operators. I find that Python's magic methods are a surpri
by yen223 14y ago
I used to think they were ugly too, until I wrote a Python library which made heavy use of overloaded operators. I find that Python's magic methods are a surprisingly elegant way to implement class-specific operators and comparators, at least compared with other languages.