[pypy-commit] pypy numpypy-complex2: translation fixes

mattip noreply at buildbot.pypy.org
Tue Sep 25 12:50:11 CEST 2012


Author: mattip <matti.picus at gmail.com>
Branch: numpypy-complex2
Changeset: r57561:827effdb13bc
Date: 2012-09-25 12:05 +0200
http://bitbucket.org/pypy/pypy/changeset/827effdb13bc/

Log:	translation fixes

diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py
--- a/pypy/module/micronumpy/types.py
+++ b/pypy/module/micronumpy/types.py
@@ -1115,24 +1115,24 @@
     def ge(self, v1, v2):
         return self._lt(v2, v1) or self._eq(v2, v1) 
 
+    def _bool(self, v):
+        return bool(v[0]) or bool(v[1])
+
     @raw_binary_op
     def logical_and(self, v1, v2):
-        return self.bool(v1) and self.bool(v2)
+        return self._bool(v1) and self._bool(v2)
 
     @raw_binary_op
     def logical_or(self, v1, v2):
-        return self.bool(v1) or self.bool(v2)
+        return self._bool(v1) or self._bool(v2)
 
     @raw_unary_op
     def logical_not(self, v):
-        return not self.bool(v)
+        return not self._bool(v)
 
     @raw_binary_op
     def logical_xor(self, v1, v2):
-        return self.bool(v1) ^ self.bool(v2)
-
-    def bool(self, v):
-        return bool(v[0]) or bool(v[1])
+        return self._bool(v1) ^ self._bool(v2)
 
     @complex_binary_op
     def floordiv(self, v1, v2):


More information about the pypy-commit mailing list