Author: Philip Jenvey <pjen...@underboss.org>
Branch: py3k
Changeset: r69922:1366c85a0748
Date: 2014-03-12 19:38 -0700
http://bitbucket.org/pypy/pypy/changeset/1366c85a0748/

Log:    workaround lack of space.hex/oct on py3k

diff --git a/pypy/module/micronumpy/ndarray.py 
b/pypy/module/micronumpy/ndarray.py
--- a/pypy/module/micronumpy/ndarray.py
+++ b/pypy/module/micronumpy/ndarray.py
@@ -1043,7 +1043,7 @@
             raise oefmt(space.w_TypeError,
                         "don't know how to convert scalar number to hex")
         value = self.get_scalar_value()
-        return space.hex(value)
+        return space.call_method(space.builtin, 'hex', value)
 
     def descr_oct(self, space):
         if self.get_size() != 1:
@@ -1053,7 +1053,7 @@
             raise oefmt(space.w_TypeError,
                         "don't know how to convert scalar number to oct")
         value = self.get_scalar_value()
-        return space.oct(value)
+        return space.call_method(space.builtin, 'oct', value)
 
     def descr_index(self, space):
         if self.get_size() != 1 or \
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to