[issue2102] New style classes __ror__() operator overloading problem

2008-02-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Doc says: http://docs.python.org/dev/reference/datamodel.html#object.__ror__ """ These functions are only called if the left operand does not support the corresponding operation and the operands are of different types. For operands of the same type, it is

[issue2102] New style classes __ror__() operator overloading problem

2008-02-13 Thread Wummel
New submission from Wummel: Hi, the attached code in t.py fails to run: class C (object): def __ror__ (self, other): return 42 print C() | C() $ python t.py Traceback (most recent call last): File "t.py", line 5, in ? print C() | C() TypeError: unsupported operand type(s) for