# HG changeset patch # User Paul Boddie # Date 1385674036 -3600 # Node ID a12c5b0c431b443593e07321cd6fe56d9052caec # Parent 04f2a6949903c214d7df2a2ccafa9a788850f179 Produce a "pass" statement where compound statements are empty. diff -r 04f2a6949903 -r a12c5b0c431b compiler/ast.py --- a/compiler/ast.py Sun Nov 17 00:24:20 2013 +0100 +++ b/compiler/ast.py Thu Nov 28 22:27:16 2013 +0100 @@ -1808,7 +1808,8 @@ return "Stmt(%r)" % (self.nodes,) def __str__(self): - return "\n".join(map(str, flatten_statement(self.nodes))) + nodes = flatten_statement(self.nodes) + return "\n".join(map(str, nodes or [Pass()])) def visit(self, visitor, *args): return visitor.visitStmt(self, *args)