mirror of
https://github.com/python/cpython.git
synced 2026-08-11 16:28:53 +08:00
For several builtin functions, we now fall back to __main__.__dict__ for the globals when there is no current frame and _PyInterpreterState_IsRunningMain() returns true. This allows those functions to be run with Interpreter.call(). The affected builtins: * exec() * eval() * globals() * locals() * vars() * dir() We take a similar approach with "stateless" functions, which don't use any global variables. (cherry picked from commit a450a0ddec, AKA gh-135491) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Miscellaneous source files for the main Python shared library