[pypy-svn] r8440 - pypy/branch/src-typedunwrap/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Thu Jan 20 16:52:22 CET 2005
Author: arigo
Date: Thu Jan 20 16:52:22 2005
New Revision: 8440
Modified:
pypy/branch/src-typedunwrap/pypy/objspace/std/listobject.py
Log:
Moved the call to the comparison function outside the try:except: block.
Modified: pypy/branch/src-typedunwrap/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/branch/src-typedunwrap/pypy/objspace/std/listobject.py (original)
+++ pypy/branch/src-typedunwrap/pypy/objspace/std/listobject.py Thu Jan 20 16:52:22 2005
@@ -514,13 +514,14 @@
def complex_lt(self, a, b):
space = self.space
w_cmp = self.w_cmp
+ w_result = space.call_function(w_cmp, a, b)
try:
- result = space.int_w(space.call_function(w_cmp, a, b))
+ result = space.int_w(w_result)
except OperationError, e:
if e.match(space, space.w_TypeError):
raise OperationError(space.w_TypeError,
space.wrap("comparison function must return int"))
- raise e
+ raise
return result < 0
def list_sort__List_ANY(space, w_list, w_cmp):
More information about the Pypy-commit
mailing list