Author: Benjamin Peterson <[email protected]>
Branch: 
Changeset: r44410:81eca008b568
Date: 2011-05-24 14:52 -0500
http://bitbucket.org/pypy/pypy/changeset/81eca008b568/

Log:    remove check for bool which will always hold

diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -219,8 +219,9 @@
         if w_res is space.w_True:
             return True
         w_restype = space.type(w_res)
-        if (space.is_w(w_restype, space.w_bool) or
-            space.is_w(w_restype, space.w_int) or
+        # Note there is no check for bool here because the only possible
+        # instances of bool are w_False and w_True, which are checked above.
+        if (space.is_w(w_restype, space.w_int) or
             space.is_w(w_restype, space.w_long)):
             return space.int_w(w_res) != 0
         else:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to