File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1447,8 +1447,9 @@ are always available. They are listed here in alphabetical order.
14471447 replaced (by importing the :mod: `builtins ` module and assigning to
14481448 ``builtins.__import__ ``) in order to change semantics of the
14491449 :keyword: `import ` statement, but nowadays it is usually simpler to use import
1450- hooks (see :pep: `302 `). Direct use of :func: `__import__ ` is rare, except in
1451- cases where you want to import a module whose name is only known at runtime.
1450+ hooks (see :pep: `302 `) to attain the same goals. Direct use of
1451+ :func: `__import__ ` is entirely discouraged in favor of
1452+ :func: `importlib.import_module `.
14521453
14531454 The function imports the module *name *, potentially using the given *globals *
14541455 and *locals * to determine how to interpret the name in a package context.
@@ -1460,7 +1461,8 @@ are always available. They are listed here in alphabetical order.
14601461 *level * specifies whether to use absolute or relative imports. ``0 `` (the
14611462 default) means only perform absolute imports. Positive values for
14621463 *level * indicate the number of parent directories to search relative to the
1463- directory of the module calling :func: `__import__ `.
1464+ directory of the module calling :func: `__import__ ` (see :pep: `328 ` for the
1465+ details).
14641466
14651467 When the *name * variable is of the form ``package.module ``, normally, the
14661468 top-level package (the name up till the first dot) is returned, *not * the
You can’t perform that action at this time.
0 commit comments