]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113113: doc: use less ambiguously named variable (gh-113114)
authorjeremy-dolan <129558107+jeremy-dolan@users.noreply.github.com>
Thu, 14 Dec 2023 15:40:24 +0000 (10:40 -0500)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2023 15:40:24 +0000 (15:40 +0000)
Doc/tutorial/controlflow.rst

index aa9caa101da40a43bee8581b75771689af1ca92a..77444f9cb8358d865a3d53758e0862ee4923307b 100644 (file)
@@ -559,10 +559,10 @@ defined to allow.  For example::
 
    def ask_ok(prompt, retries=4, reminder='Please try again!'):
        while True:
-           ok = input(prompt)
-           if ok in ('y', 'ye', 'yes'):
+           reply = input(prompt)
+           if reply in {'y', 'ye', 'yes'}:
                return True
-           if ok in ('n', 'no', 'nop', 'nope'):
+           if reply in {'n', 'no', 'nop', 'nope'}:
                return False
            retries = retries - 1
            if retries < 0: