From bfbad0c73263c279d5834ecf1ad007dc03dc03c6 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 29 Oct 2022 00:53:30 -0700 Subject: [PATCH 1/2] gh-70393: Clarify mention of "middle" scope --- Doc/tutorial/classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 9ecbf8b87efbf1..3614833b5ae7ab 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -124,7 +124,7 @@ directly accessible: * 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 From c498ae009b8416892d31efa52f9f0290696d4318 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 1 Nov 2022 21:19:51 -0700 Subject: [PATCH 2/2] grammar fix --- Doc/tutorial/classes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 3614833b5ae7ab..0e5a9402bc50e3 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -119,7 +119,7 @@ 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