[pypy-svn] r7610 - pypy/trunk/src/pypy/objspace/std
mgedmin at codespeak.net
mgedmin at codespeak.net
Tue Nov 23 13:24:03 CET 2004
Author: mgedmin
Date: Tue Nov 23 13:24:02 2004
New Revision: 7610
Modified:
pypy/trunk/src/pypy/objspace/std/multimethod.py
pypy/trunk/src/pypy/objspace/std/stdtypedef.py
Log:
FailedToImplement is always raised with either zero or two arguments,
and the annotator dislikes raise Something(*e.args).
Modified: pypy/trunk/src/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/multimethod.py (original)
+++ pypy/trunk/src/pypy/objspace/std/multimethod.py Tue Nov 23 13:24:02 2004
@@ -469,11 +469,7 @@
return self.perform_call(args)
except FailedToImplement, e:
if e.args:
- if len(e.args) == 1:
- w_value = self.space.w_None
- else:
- w_value = e.args[1]
- raise OperationError(e.args[0], w_value)
+ raise OperationError(e.args[0], e.args[1])
else:
# raise a TypeError for a FailedToImplement
initialtypes = [a.__class__
Modified: pypy/trunk/src/pypy/objspace/std/stdtypedef.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/stdtypedef.py (original)
+++ pypy/trunk/src/pypy/objspace/std/stdtypedef.py Tue Nov 23 13:24:02 2004
@@ -179,7 +179,7 @@
return self.code.mm.perform_call(args)
except FailedToImplement, e:
if e.args:
- raise OperationError(*e.args)
+ raise OperationError(e.args[0], e.args[1])
else:
return self.space.w_NotImplemented
More information about the Pypy-commit
mailing list