[pypy-svn] r34967 - pypy/dist/pypy/rpython

arigo at codespeak.net arigo at codespeak.net
Sat Nov 25 17:56:32 CET 2006


Author: arigo
Date: Sat Nov 25 17:56:30 2006
New Revision: 34967

Modified:
   pypy/dist/pypy/rpython/rint.py
Log:
Another small error reporting improvement.


Modified: pypy/dist/pypy/rpython/rint.py
==============================================================================
--- pypy/dist/pypy/rpython/rint.py	(original)
+++ pypy/dist/pypy/rpython/rint.py	Sat Nov 25 17:56:30 2006
@@ -8,7 +8,7 @@
 from pypy.rpython.rmodel import IntegerRepr, inputconst
 from pypy.rpython.robject import PyObjRepr, pyobj_repr
 from pypy.rlib.rarithmetic import intmask, r_int, r_uint, r_ulonglong, r_longlong
-from pypy.rpython.error import TyperError
+from pypy.rpython.error import TyperError, MissingRTypeOperation
 from pypy.rpython.rmodel import log
 from pypy.rlib import objectmodel
 
@@ -117,6 +117,15 @@
         return _rtype_template(hop, 'rshift', [ValueError])
     rtype_inplace_rshift = rtype_rshift
 
+    def rtype_pow(_, hop):
+        raise MissingRTypeOperation("pow(int, int)"
+                                    " (use float**float instead; it is too"
+                                    " easy to overlook the overflow"
+                                    " issues of int**int)")
+
+    rtype_pow_ovf = rtype_pow
+    rtype_inplace_pow = rtype_pow
+
 ##    def rtype_pow(_, hop, suffix=''):
 ##        if hop.has_implicit_exception(ZeroDivisionError):
 ##            suffix += '_zer'



More information about the Pypy-commit mailing list