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 exarkun
Recipients exarkun
Date 2009-12-13.15:58:43
SpamBayes Score 0.000245973
Marked as misclassified No
Message-id <1260719927.85.0.160252441292.issue7491@psf.upfronthosting.co.za>
In-reply-to
Content
Here's an example of a metaclass with a __cmp__ special:

    exarkun@boson:/tmp$ cat metacmp.py
    class X(type):
        def __cmp__(self, other):
            return -1

    class Y:
        __metaclass__ = X

    print Y < Y
    exarkun@boson:/tmp$ python2.5 metacmp.py
    True
    exarkun@boson:/tmp$ python2.6 metacmp.py
    False
    exarkun@boson:/tmp$

In Python 2.6 and Python 2.7a1, the __cmp__ isn't even invoked, as it
was in Python 2.5.

This breaks the ordering of item types in Axiom.  A brief search reveals
that sympy also ran into the problem, but they may have since worked
around it.
History
Date User Action Args
2009-12-13 15:58:48exarkunsetrecipients: + exarkun
2009-12-13 15:58:47exarkunsetmessageid: <1260719927.85.0.160252441292.issue7491@psf.upfronthosting.co.za>
2009-12-13 15:58:44exarkunlinkissue7491 messages
2009-12-13 15:58:43exarkuncreate