[pypy-commit] pypy default: negative bools??!

cfbolz noreply at buildbot.pypy.org
Fri Nov 4 16:35:46 CET 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: 
Changeset: r48757:43676b026018
Date: 2011-11-04 16:34 +0100
http://bitbucket.org/pypy/pypy/changeset/43676b026018/

Log:	negative bools??!

diff --git a/pypy/objspace/std/boolobject.py b/pypy/objspace/std/boolobject.py
--- a/pypy/objspace/std/boolobject.py
+++ b/pypy/objspace/std/boolobject.py
@@ -27,11 +27,7 @@
 
     def uint_w(w_self, space):
         intval = int(w_self.boolval)
-        if intval < 0:
-            raise OperationError(space.w_ValueError,
-                                 space.wrap("cannot convert negative integer to unsigned"))
-        else:
-            return r_uint(intval)
+        return r_uint(intval)
 
     def bigint_w(w_self, space):
         return rbigint.fromint(int(w_self.boolval))


More information about the pypy-commit mailing list