+ 1
Magic __add__ question
Talking about how the __add__ example I find that negative values won’t work. Why is that?
2 Respuestas
+ 1
Actually it does work with negatives and negative results I had erased the closing ) on one of the variables when I substituted negatives. Shoulda took a 2nd look.
0
I have a hypothesis that using negative values within addition would perform subtraction and thus call the __sub__ magic method instead.