Skip to content

Commit

Permalink
pythongh-113113: doc: use less ambiguously named variable (pythongh-1…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-dolan authored Dec 14, 2023
1 parent fd81afc commit fb4cb7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fb4cb7c

Please sign in to comment.