[PythonEdu] Magic method overriding | Sololearn: Learn to code for FREE!
+ 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

2nd Apr 2017, 9:35 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
1 Answer
+ 15
Good example how to have fun when it's debugging time ^^
6th Apr 2017, 4:19 PM
Tashi N
Tashi N - avatar