+ 12
[PythonEdu] Magic method overriding
As you know from the course, Python enables overriding of inherited class methods (kind of a polymorphic feature). That means that also magic operator methods may be overridden. But that can lead to unpredictable results. Heed the warning :) And see for yourself: https://code.sololearn.com/cDcyBAgWX0fA/?ref=app
1 Answer
+ 15
Good example how to have fun when it's debugging time ^^