From: Georg Brandl Date: Sat, 30 May 2009 07:31:25 +0000 (+0000) Subject: Use preferred form of raising exceptions. X-Git-Tag: v2.7a1~1069 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7be493a86c63feeb423302afc5906441d4ec1331;p=python Use preferred form of raising exceptions. --- diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 95a6ea4d2c..cc1d334a7a 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -315,7 +315,7 @@ defined to allow. For example:: 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' + if retries < 0: raise IOError('refusenik user') print complaint This function can be called either like this: ``ask_ok('Do you really want to