Skip to content

Commit 71b0326

Browse files
gh-70393: Clarify mention of "middle" scope (GH-98839)
(cherry picked from commit 70be5e4) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent 593c5a0 commit 71b0326

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/tutorial/classes.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ directly accessible:
119119

120120
* the innermost scope, which is searched first, contains the local names
121121
* the scopes of any enclosing functions, which are searched starting with the
122-
nearest enclosing scope, contains non-local, but also non-global names
122+
nearest enclosing scope, contain non-local, but also non-global names
123123
* the next-to-last scope contains the current module's global names
124124
* the outermost scope (searched last) is the namespace containing built-in names
125125

126126
If a name is declared global, then all references and assignments go directly to
127-
the middle scope containing the module's global names. To rebind variables
127+
the next-to-last scope containing the module's global names. To rebind variables
128128
found outside of the innermost scope, the :keyword:`nonlocal` statement can be
129129
used; if not declared nonlocal, those variables are read-only (an attempt to
130130
write to such a variable will simply create a *new* local variable in the

0 commit comments

Comments
 (0)