From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:25:07 +0000 (+0100) Subject: [3.12] gh-113113: doc: use less ambiguously named variable (gh-113114) (gh-113122) X-Git-Tag: v3.12.2~318 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a157881dbc64a965672aa8bb0a716d93fbdfbade;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-113113: doc: use less ambiguously named variable (gh-113114) (gh-113122) --- diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index aa9caa101da4..77444f9cb835 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -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: