[pypy-svn] r66568 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler

benjamin at codespeak.net benjamin at codespeak.net
Fri Jul 24 03:18:16 CEST 2009


Author: benjamin
Date: Fri Jul 24 03:18:15 2009
New Revision: 66568

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py
Log:
fix complicated conditions for folding bool ops

Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py	(original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py	Fri Jul 24 03:18:15 2009
@@ -225,7 +225,7 @@
         while i < len(values) - 1:
             truth = values[i].as_constant_truth(self.space)
             if truth != CONST_NOT_CONST:
-                if truth == CONST_FALSE == we_are_and:
+                if (truth != CONST_TRUE) == we_are_and:
                     del values[i + 1:]
                     break
                 else:



More information about the Pypy-commit mailing list