[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> exec docs should note that the no argument form in a local scope is really the two argument form ___ Python tracker

[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: I think this is essentially a duplicate of #24800. (Short version, the behaviour is by design, and documented, but there may be scope for clarifying or improving the documentation.) -- nosy: +mark.dickinson ___ Py

[issue43507] Variables in locals scope fails to be printed.

2021-03-15 Thread Xinmeng Xia
New submission from Xinmeng Xia : The following code 1 calls function 'compile' and 'exec' and execute a statement "s=1". Then we print the value of 's'. This code can perform well on Python 3.9.2 and output the expected result. However, we pack the whole code into a function (code 2). The e