[pypy-svn] r10080 - pypy/dist/pypy/documentation/revreport

arigo at codespeak.net arigo at codespeak.net
Tue Mar 22 19:49:23 CET 2005


Author: arigo
Date: Tue Mar 22 19:49:23 2005
New Revision: 10080

Modified:
   pypy/dist/pypy/documentation/revreport/delta.py
Log:
Grumble grumble __cmp__ only in CPython without rich comparisons grumble.


Modified: pypy/dist/pypy/documentation/revreport/delta.py
==============================================================================
--- pypy/dist/pypy/documentation/revreport/delta.py	(original)
+++ pypy/dist/pypy/documentation/revreport/delta.py	Tue Mar 22 19:49:23 2005
@@ -668,13 +668,7 @@
         names.update(expl1.names(cls))
 
     for cls in expl2.get_mro(cls2):
-        d = Set(expl2.names(cls))
-        if ('__cmp__' in d and '__cmp__' not in names and
-            '__eq__' in d and '__ne__' in d and
-            '__lt__' in d and '__le__' in d and
-            '__gt__' in d and '__ge__' in d):
-            d.remove('__cmp__')
-        names.update(d)
+        names.update(expl2.names(cls))
 
     if cls2 is type:     # strange strange attributes we don't care about
         names.remove('__basicsize__')
@@ -693,6 +687,12 @@
         if obj1 is NOTFOUND and obj2 is NOTFOUND:
             continue # spurious :(
 
+        if name == '__cmp__' and obj1 is NOTFOUND and (
+            '__eq__' in names and '__ne__' in names and
+            '__lt__' in names and '__le__' in names and
+            '__gt__' in names and '__ge__' in names):
+            continue # __cmp__ is only in CPython, PyPy has the rich cmp instead
+
         entry = Entry(name)
         if cls1_is_not_a_class:
             entry.status = expl2



More information about the Pypy-commit mailing list