[Python-3000-checkins] r58077 - python/branches/py3k/Doc/tutorial/controlflow.rst python/branches/py3k/Doc/tutorial/errors.rst
collin.winter
python-3000-checkins at python.org
Mon Sep 10 02:39:53 CEST 2007
Author: collin.winter
Date: Mon Sep 10 02:39:52 2007
New Revision: 58077
Modified:
python/branches/py3k/Doc/tutorial/controlflow.rst
python/branches/py3k/Doc/tutorial/errors.rst
Log:
Fix more raise statments in the docs.
Modified: python/branches/py3k/Doc/tutorial/controlflow.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/controlflow.rst (original)
+++ python/branches/py3k/Doc/tutorial/controlflow.rst Mon Sep 10 02:39:52 2007
@@ -329,7 +329,8 @@
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
Modified: python/branches/py3k/Doc/tutorial/errors.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/errors.rst (original)
+++ python/branches/py3k/Doc/tutorial/errors.rst Mon Sep 10 02:39:52 2007
@@ -262,7 +262,7 @@
... print('My exception occurred, value:', e.value)
...
My exception occurred, value: 4
- >>> raise MyError, 'oops!'
+ >>> raise MyError('oops!')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
__main__.MyError: 'oops!'
More information about the Python-3000-checkins
mailing list