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