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

Amaury Forgeot d'Arc report at bugs.python.org
Wed Feb 13 16:01:25 CET 2008


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 assumed that if the non-reflected
method (such as __add__()) fails the operation is not supported, which
is why the reflected method is not called.
"""

So I'd say the opposite: this is an old-style class problem.

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2102>
__________________________________


More information about the Python-bugs-list mailing list