[pypy-svn] r66380 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler
benjamin at codespeak.net
benjamin at codespeak.net
Sat Jul 18 20:40:10 CEST 2009
Author: benjamin
Date: Sat Jul 18 20:40:10 2009
New Revision: 66380
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/astbuilder.py
Log:
move assertion
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/astbuilder.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/astbuilder.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/astbuilder.py Sat Jul 18 20:40:10 2009
@@ -1177,7 +1177,6 @@
for_node = comp_for.children[1]
for_targets = self.handle_exprlist(for_node, ast.Store)
expr = handle_source_expression(comp_for.children[3])
- assert isinstance(expr, ast.expr)
if len(for_node.children) == 1:
comp = ast.comprehension(for_targets[0], expr, None)
else:
@@ -1198,6 +1197,7 @@
comp.ifs = ifs
if comp_for.type == iter_type:
comp_for = comp_for.children[0]
+ assert isinstance(comp, ast.comprehension)
comps.append(comp)
return elt, comps
More information about the Pypy-commit
mailing list