diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2021-10-20 20:55:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 20:55:46 -0700 |
commit | c52338fc42353e8d0c6214e4c22427807439dfd5 (patch) | |
tree | 6da4bf5da5eb739aa48eab1850218d5726c45b10 /Doc/reference | |
parent | 8f05ffb0534c2343fc45ad0e1d91ae1dc2d92b64 (diff) | |
parent | 2a9ab75af32b1ee9f210ae2a0718990687d0f79d (diff) | |
download | cpython-git-enum-private-310.tar.gz |
Merge branch '3.10' into enum-private-310enum-private-310
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/executionmodel.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst index 55ac01b6a8..5c85dd7052 100644 --- a/Doc/reference/executionmodel.rst +++ b/Doc/reference/executionmodel.rst @@ -119,14 +119,14 @@ is subtle. Python lacks declarations and allows name binding operations to occur anywhere within a code block. The local variables of a code block can be determined by scanning the entire text of the block for name binding operations. -If the :keyword:`global` statement occurs within a block, all uses of the name -specified in the statement refer to the binding of that name in the top-level +If the :keyword:`global` statement occurs within a block, all uses of the names +specified in the statement refer to the bindings of those names in the top-level namespace. Names are resolved in the top-level namespace by searching the global namespace, i.e. the namespace of the module containing the code block, and the builtins namespace, the namespace of the module :mod:`builtins`. The -global namespace is searched first. If the name is not found there, the +global namespace is searched first. If the names are not found there, the builtins namespace is searched. The :keyword:`!global` statement must precede -all uses of the name. +all uses of the listed names. The :keyword:`global` statement has the same scope as a name binding operation in the same block. If the nearest enclosing scope for a free variable contains |