[pypy-svn] r9318 - pypy/dist/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Fri Feb 18 19:49:23 CET 2005
Author: arigo
Date: Fri Feb 18 19:49:23 2005
New Revision: 9318
Modified:
pypy/dist/pypy/objspace/std/longobject.py
Log:
Now that we have pow__Int_Int_Long(), we don't need
pow_ovr__Int_Int_Int() any more.
Modified: pypy/dist/pypy/objspace/std/longobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/longobject.py (original)
+++ pypy/dist/pypy/objspace/std/longobject.py Fri Feb 18 19:49:23 2005
@@ -183,21 +183,6 @@
space.wrap(e.args[0]))
return W_LongObject(space, t)
-def pow__Int_Int_Long(space, w_int1, w_int2, w_long3):
- x = w_int1.intval
- y = w_int2.intval
- z = w_long3.longval
-
- try:
- t = long(pow(x, y, z))
- except TypeError, e:
- raise OperationError(space.w_TypeError,
- space.wrap(e.args[0]))
- except ValueError, e:
- raise OperationError(space.w_ValueError,
- space.wrap(e.args[0]))
- return W_LongObject(space, t)
-
def neg__Long(space, w_long1):
return W_LongObject(space, -w_long1.longval)
@@ -293,11 +278,10 @@
w_long2 = delegate_Int2Long(w_int2)
return pow__Long_Long_None(space, w_long1, w_long2, w_none3)
-def pow_ovr__Int_Int_Int(space, w_int1, w_int2, w_int3):
+def pow_ovr__Int_Int_Long(space, w_int1, w_int2, w_long3):
w_long1 = delegate_Int2Long(w_int1)
w_long2 = delegate_Int2Long(w_int2)
- w_long3 = delegate_Int2Long(w_int3)
return pow__Long_Long_Long(space, w_long1, w_long2, w_long3)
StdObjSpace.MM.pow.register(pow_ovr__Int_Int_None, W_IntObject, W_IntObject, W_NoneObject, order=1)
-StdObjSpace.MM.pow.register(pow_ovr__Int_Int_Int , W_IntObject, W_IntObject, W_IntObject, order=1)
+StdObjSpace.MM.pow.register(pow_ovr__Int_Int_Long, W_IntObject, W_IntObject, W_LongObject, order=1)
More information about the Pypy-commit
mailing list