From: Raymond Hettinger Date: Tue, 2 Dec 2003 07:38:30 +0000 (+0000) Subject: Convert a 0/1 to False/True. X-Git-Tag: v2.4a1~1178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25695282a57e3212acb48ab4d022bf2ea4092e1d;p=thirdparty%2FPython%2Fcpython.git Convert a 0/1 to False/True. --- diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index 56dd395587f3..1c9b0bcf4f02 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1420,8 +1420,8 @@ arguments than it is defined def ask_ok(prompt, retries=4, complaint='Yes or no, please!'): while True: ok = raw_input(prompt) - if ok in ('y', 'ye', 'yes'): return 1 - if ok in ('n', 'no', 'nop', 'nope'): return 0 + if ok in ('y', 'ye', 'yes'): return True + if ok in ('n', 'no', 'nop', 'nope'): return False retries = retries - 1 if retries < 0: raise IOError, 'refusenik user' print complaint