[Python-checkins] cpython (merge 3.5 -> default): Issue #23116: Merge from 3.5

berker.peksag python-checkins at python.org
Thu Jun 2 14:21:59 EDT 2016


https://hg.python.org/cpython/rev/174eae50b664
changeset: 101600:174eae50b664
parent: 101598:b110dd3d6cea
parent: 101599:ef800c30e28c
user: Berker Peksag <berker.peksag at gmail.com>
date: Thu Jun 02 11:31:51 2016 -0700
summary:
 Issue #23116: Merge from 3.5
files:
 Doc/tutorial/controlflow.rst | 6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -364,7 +364,7 @@
 This creates a function that can be called with fewer arguments than it is
 defined to allow. For example::
 
- def ask_ok(prompt, retries=4, complaint='Yes or no, please!'):
+ def ask_ok(prompt, retries=4, reminder='Please try again!'):
 while True:
 ok = input(prompt)
 if ok in ('y', 'ye', 'yes'):
@@ -373,8 +373,8 @@
 return False
 retries = retries - 1
 if retries < 0:
- raise OSError('uncooperative user')
- print(complaint)
+ raise ValueError('invalid user response')
+ print(reminder)
 
 This function can be called in several ways:
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /