mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
PEP 3147
This commit is contained in:
parent
0e59cc3fc3
commit
28a691b7fd
39 changed files with 1203 additions and 287 deletions
|
@ -67,6 +67,7 @@ def _run_code(code, run_globals, init_globals=None,
|
|||
run_globals.update(init_globals)
|
||||
run_globals.update(__name__ = mod_name,
|
||||
__file__ = mod_fname,
|
||||
__cached__ = None,
|
||||
__loader__ = mod_loader,
|
||||
__package__ = pkg_name)
|
||||
exec(code, run_globals)
|
||||
|
@ -130,6 +131,7 @@ def _run_module_as_main(mod_name, alter_argv=True):
|
|||
At the very least, these variables in __main__ will be overwritten:
|
||||
__name__
|
||||
__file__
|
||||
__cached__
|
||||
__loader__
|
||||
__package__
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue