[pypy-svn] r10070 - pypy/dist/pypy/documentation/revreport
arigo at codespeak.net
arigo at codespeak.net
Tue Mar 22 18:58:49 CET 2005
Author: arigo
Date: Tue Mar 22 18:58:49 2005
New Revision: 10070
Modified:
pypy/dist/pypy/documentation/revreport/delta.py
Log:
Ignore CPython's __cmp__ methods when it also has __eq__&friends.
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 18:58:49 2005
@@ -668,7 +668,13 @@
names.update(expl1.names(cls))
for cls in expl2.get_mro(cls2):
- names.update(expl2.names(cls))
+ 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):
+ del d['__cmp__']
+ names.update(d)
names = list(names)
names.sort()
More information about the Pypy-commit
mailing list