mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-113113: doc: use less ambiguously named variable (gh-113114) (gh-113122)
This commit is contained in:
parent
c6c559a669
commit
a157881dbc
1 changed files with 3 additions and 3 deletions
|
@ -559,10 +559,10 @@ defined to allow. For example::
|
||||||
|
|
||||||
def ask_ok(prompt, retries=4, reminder='Please try again!'):
|
def ask_ok(prompt, retries=4, reminder='Please try again!'):
|
||||||
while True:
|
while True:
|
||||||
ok = input(prompt)
|
reply = input(prompt)
|
||||||
if ok in ('y', 'ye', 'yes'):
|
if reply in {'y', 'ye', 'yes'}:
|
||||||
return True
|
return True
|
||||||
if ok in ('n', 'no', 'nop', 'nope'):
|
if reply in {'n', 'no', 'nop', 'nope'}:
|
||||||
return False
|
return False
|
||||||
retries = retries - 1
|
retries = retries - 1
|
||||||
if retries < 0:
|
if retries < 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue