[Python-checkins] gh-70393: Clarify mention of "middle" scope (GH-98839)

miss-islington webhook-mailer at python.org
Sun Dec 11 23:25:11 EST 2022


https://github.com/python/cpython/commit/71b032635d757348cb915c2e8d99392f5bbcb059
commit: 71b032635d757348cb915c2e8d99392f5bbcb059
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-12-11T20:25:06-08:00
summary:

gh-70393: Clarify mention of "middle" scope (GH-98839)

(cherry picked from commit 70be5e42f6e288de32e0df3c77ac22a9ddf1a74b)

Co-authored-by: Shantanu <12621235+hauntsaninja at users.noreply.github.com>

files:
M Doc/tutorial/classes.rst

diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index f27abe48b2d4..d7a24b4893fb 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -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



More information about the Python-checkins mailing list