summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremy-dolan <129558107+jeremy-dolan@users.noreply.github.com>2023-12-14 15:40:24 (GMT)
committerGitHub <noreply@github.com>2023-12-14 15:40:24 (GMT)
commitfb4cb7ce310e28e25d3adf33b29cb97c637097ed (patch)
tree3d30d503c2066c7b29d348baeedad9adcec24b77
parentfd81afc624402816e3455fd8e932ac7702e4d988 (diff)
downloadcpython-fb4cb7ce310e28e25d3adf33b29cb97c637097ed.zip
cpython-fb4cb7ce310e28e25d3adf33b29cb97c637097ed.tar.gz
cpython-fb4cb7ce310e28e25d3adf33b29cb97c637097ed.tar.bz2
gh-113113: doc: use less ambiguously named variable (gh-113114)
-rw-r--r--Doc/tutorial/controlflow.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index aa9caa1..77444f9 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: