This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author calvin
Recipients calvin
Date 2008-02-13.14:51:14
SpamBayes Score 0.042989213
Marked as misclassified No
Message-id <>

the attached code in fails to run:
class C (object):
    def __ror__ (self, other):
        return 42
print C() | C()

$ python
Traceback (most recent call last):
  File "", line 5, in ?
    print C() | C()
TypeError: unsupported operand type(s) for |: 'C' and 'C'

If I use old style classes (ie. "class C:" instead of "class
C(object):"), the code runs fine. I suspect that the method lookup for
special operator methods is different in new style classes, but why?
This might also be related to issue #643841 but I am not sure.
Date User Action Args
2008-02-13 14:51:16calvinsetspambayes_score: 0.0429892 -> 0.042989213
recipients: + calvin
2008-02-13 14:51:15calvinsetspambayes_score: 0.0429892 -> 0.0429892
messageid: <>
2008-02-13 14:51:14calvinlinkissue2102 messages
2008-02-13 14:51:14calvincreate