mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Update sys module to conform with the PEP, add matching C API
This commit is contained in:
parent
fe526b4e54
commit
06b9110569
18 changed files with 260 additions and 177 deletions
|
|
@ -3072,14 +3072,14 @@ _PyEval_LazyImportName(PyThreadState *tstate, PyObject *builtins, PyObject *glob
|
|||
{
|
||||
PyObject *res = NULL;
|
||||
// Check if global policy overrides the local syntax
|
||||
switch (PyImport_LazyImportsEnabled()) {
|
||||
case PyLazyImportsMode_ForcedOff:
|
||||
switch (PyImport_GetLazyImportsMode()) {
|
||||
case PyImport_LAZY_NONE:
|
||||
lazy = 0;
|
||||
break;
|
||||
case PyLazyImportsMode_ForcedOn:
|
||||
case PyImport_LAZY_ALL:
|
||||
lazy = 1;
|
||||
break;
|
||||
case PyLazyImportsMode_Default:
|
||||
case PyImport_LAZY_NORMAL:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue