diff options
author | Georg Brandl <georg@python.org> | 2009-05-30 07:31:25 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-05-30 07:31:25 (GMT) |
commit | 7be493a86c63feeb423302afc5906441d4ec1331 (patch) | |
tree | 25de216f1cae144be21ad8c6e86ba1954338c257 | |
parent | ccbb47be5e7686bcda102dacd2d68cbfa698c3b5 (diff) | |
download | cpython-7be493a86c63feeb423302afc5906441d4ec1331.zip cpython-7be493a86c63feeb423302afc5906441d4ec1331.tar.gz cpython-7be493a86c63feeb423302afc5906441d4ec1331.tar.bz2 |
Use preferred form of raising exceptions.
-rw-r--r-- | Doc/tutorial/controlflow.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 95a6ea4..cc1d334 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 |