Message96334
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. |
|
Date |
User |
Action |
Args |
2009-12-13 15:58:48 | exarkun | set | recipients:
+ exarkun |
2009-12-13 15:58:47 | exarkun | set | messageid: <1260719927.85.0.160252441292.issue7491@psf.upfronthosting.co.za> |
2009-12-13 15:58:44 | exarkun | link | issue7491 messages |
2009-12-13 15:58:43 | exarkun | create | |
|