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