New submission from Pyry Pakkanen <[EMAIL PROTECTED]>: >>> class test: ... def __radd__(self,other): ... return '__radd__ called' ... >>> t = test() >>> 1 + t '__radd__ called' >>> t + t Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'test' and 'test'
This applies to all of the reflected operations. ---------- messages: 68625 nosy: Frosburn severity: normal status: open title: __radd__(self,other) isn't called if self and other are of the same class versions: Python 2.5, Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3178> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com