Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/reference/simple_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,9 @@ The basic import statement (no :keyword:`from` clause) is executed in two
steps:

#. find a module, loading and initializing it if necessary
#. define a name or names in the local namespace for the scope where
the :keyword:`import` statement occurs.
#. define a name or names in the current namespace for the scope where
the :keyword:`import` statement occurs, just as an assignment statement
would, including global, local, and nonlocal semantics.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this would be a little clearer?

Suggested change
would, including global, local, and nonlocal semantics.
would (including :keyword:`global` and :keyword:`nonlocal` semantics).


When the statement contains multiple clauses (separated by
commas) the two steps are carried out separately for each clause, just
Expand Down Expand Up @@ -806,7 +807,7 @@ The :keyword:`from` form uses a slightly more complex process:
#. if not, attempt to import a submodule with that name and then
check the imported module again for that attribute
#. if the attribute is not found, :exc:`ImportError` is raised.
#. otherwise, a reference to that value is stored in the local namespace,
#. otherwise, a reference to that value is stored in the current namespace,
using the name in the :keyword:`!as` clause if it is present,
otherwise using the attribute name

Expand Down
Loading