[pypy-svn] r76590 - pypy/trunk/pypy/module/array
hakanardo at codespeak.net
hakanardo at codespeak.net
Wed Aug 11 17:07:53 CEST 2010
Author: hakanardo
Date: Wed Aug 11 17:07:51 2010
New Revision: 76590
Modified:
pypy/trunk/pypy/module/array/interp_array.py
Log:
clean up cmp mess
Modified: pypy/trunk/pypy/module/array/interp_array.py
==============================================================================
--- pypy/trunk/pypy/module/array/interp_array.py (original)
+++ pypy/trunk/pypy/module/array/interp_array.py Wed Aug 11 17:07:51 2010
@@ -579,10 +579,7 @@
w_lst2 = space.call_method(other, 'tolist')
return space.cmp(w_lst1, w_lst2)
else:
- try:
- return space.call_method(other, '__cmp__', self)
- except OperationError:
- return space.wrap(-1)
+ return space.w_NotImplemented
# Misc methods
@@ -654,21 +651,10 @@
from pypy.objspace.std.sliceobject import W_SliceObject
from pypy.objspace.std.listobject import W_ListObject
from pypy.objspace.std.unicodeobject import W_UnicodeObject
- #localdict = locals()
- #localdict['W_ArrayBase'] = W_ArrayBase
register_all(locals(), globals())
for mytype in types.values():
make_array(mytype)
-#def cmp__ArrayBase_ArrayBase(space, self, other):
-# print 78
-# w_lst1 = space.call_method(self, 'tolist')
-# w_lst2 = space.call_method(other, 'tolist')
-# return space.cmp(w_lst1, w_lst2)
-#
-#def cmp__ArrayBase_ANY(space, self, other):
-# return space.wrap(1)
-
register_all(locals(), globals())
More information about the Pypy-commit
mailing list