Re: [Python-Dev] New style classes and operator methods

2005-04-11 Thread Armin Rigo
Hi Greg, On Fri, Apr 08, 2005 at 05:03:42PM +1200, Greg Ewing wrote: > If the left and right operands are of the same class, > and the class implements a right operand method but > not a left operand method, the right operand method > is not called. Instead, two attempts are made to call > the lef

[Python-Dev] New style classes and operator methods

2005-04-07 Thread Greg Ewing
I think I've found a small flaw in the implementation of binary operator methods for new-style Python classes. If the left and right operands are of the same class, and the class implements a right operand method but not a left operand method, the right operand method is not called. Instead, two at