Message 274930 - Python tracker (original) (raw)

I think this is how exec() already works

This is not exactly like this, exec() emits ast.Module while interactive input emits ast.Interactive (this one skips compiler_body in compile.c), but I think I have got your point, will fix this.