Skip to content

Commit 0e463e5

Browse files
msimacektomasstupka
authored andcommitted
Fix printing in interactive mode
1 parent c146e94 commit 0e463e5

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/Compiler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ public Void visit(StmtTy.Delete node) {
17041704
@Override
17051705
public Void visit(StmtTy.Expr node) {
17061706
setLocation(node);
1707-
if (interactive) {
1707+
if (interactive && nestingLevel <= 1) {
17081708
node.value.accept(this);
17091709
addOp(PRINT_EXPR);
17101710
} else if (!(node.value instanceof ExprTy.Constant)) {

0 commit comments

Comments
 (0)