]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-70393: Clarify mention of "middle" scope (#98839)
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Mon, 12 Dec 2022 04:15:55 +0000 (20:15 -0800)
committerGitHub <noreply@github.com>
Mon, 12 Dec 2022 04:15:55 +0000 (20:15 -0800)
Doc/tutorial/classes.rst

index 9ecbf8b87efbf1bb1941b3e9c9868b9bc58926fa..0e5a9402bc50e3250edbf5412feb220f9da648b7 100644 (file)
@@ -119,12 +119,12 @@ directly accessible:
 
 * the innermost scope, which is searched first, contains the local names
 * the scopes of any enclosing functions, which are searched starting with the
-  nearest enclosing scope, contains non-local, but also non-global names
+  nearest enclosing scope, contain non-local, but also non-global names
 * the next-to-last scope contains the current module's global names
 * the outermost scope (searched last) is the namespace containing built-in names
 
 If a name is declared global, then all references and assignments go directly to
-the middle scope containing the module's global names.  To rebind variables
+the next-to-last scope containing the module's global names.  To rebind variables
 found outside of the innermost scope, the :keyword:`nonlocal` statement can be
 used; if not declared nonlocal, those variables are read-only (an attempt to
 write to such a variable will simply create a *new* local variable in the