File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -760,8 +760,9 @@ The basic import statement (no :keyword:`from` clause) is executed in two
760760steps:
761761
762762#. find a module, loading and initializing it if necessary
763- #. define a name or names in the local namespace for the scope where
764- the :keyword: `import ` statement occurs.
763+ #. define a name or names in the current namespace for the scope where
764+ the :keyword: `import ` statement occurs, just as an assignment statement
765+ would (including :keyword: `global ` and :keyword: `nonlocal ` semantics).
765766
766767When the statement contains multiple clauses (separated by
767768commas) the two steps are carried out separately for each clause, just
@@ -806,7 +807,7 @@ The :keyword:`from` form uses a slightly more complex process:
806807 #. if not, attempt to import a submodule with that name and then
807808 check the imported module again for that attribute
808809 #. if the attribute is not found, :exc: `ImportError ` is raised.
809- #. otherwise, a reference to that value is stored in the local namespace,
810+ #. otherwise, a reference to that value is stored in the current namespace,
810811 using the name in the :keyword: `!as ` clause if it is present,
811812 otherwise using the attribute name
812813
You can’t perform that action at this time.
0 commit comments