mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Add __lazy_import__, check sys.modules before import
This commit is contained in:
parent
1c691ea756
commit
3b0d745e73
18 changed files with 272 additions and 40 deletions
|
|
@ -2948,7 +2948,7 @@ dummy_func(
|
|||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
|
||||
PyObject *res_o;
|
||||
if (oparg & 0x01) {
|
||||
res_o = _PyEval_LazyImportName(tstate, BUILTINS(), GLOBALS(), name,
|
||||
res_o = _PyEval_LazyImportName(tstate, BUILTINS(), GLOBALS(), LOCALS(), name,
|
||||
PyStackRef_AsPyObjectBorrow(fromlist),
|
||||
PyStackRef_AsPyObjectBorrow(level));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue