Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
58721bca
Commit
58721bca
authored
Sep 10, 2007
by
Collin Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more raise statments in the docs.
parent
c7526f5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Doc/tutorial/controlflow.rst
Doc/tutorial/controlflow.rst
+2
-1
Doc/tutorial/errors.rst
Doc/tutorial/errors.rst
+1
-1
No files found.
Doc/tutorial/controlflow.rst
View file @
58721bca
...
...
@@ -329,7 +329,8 @@ 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
...
...
Doc/tutorial/errors.rst
View file @
58721bca
...
...
@@ -262,7 +262,7 @@ directly or indirectly. For example::
... 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!'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment