]> granicus.if.org Git - python/commitdiff
Use preferred form of raising exceptions.
authorGeorg Brandl <georg@python.org>
Sat, 30 May 2009 07:31:25 +0000 (07:31 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 30 May 2009 07:31:25 +0000 (07:31 +0000)
Doc/tutorial/controlflow.rst

index 95a6ea4d2cba3cc4020bb782e0397072a103cbf3..cc1d334a7a89e49b18fd062c6fc30a43288699cd 100644 (file)
@@ -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