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
e1b79ce1
Commit
e1b79ce1
authored
Apr 27, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5856: fix typo s in traceback example.
parent
e34d6aa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
Doc/library/traceback.rst
Doc/library/traceback.rst
+4
-5
No files found.
Doc/library/traceback.rst
View file @
e1b79ce1
:mod:`traceback` --- Print or retrieve a stack traceback
========================================================
...
...
@@ -275,10 +274,10 @@ The following example shows the different ways to print and format the stack::
This last example demonstrates the final few formatting functions::
>>> import traceback
>>> format_list([('spam.py', 3, '<module>', 'spam.eggs()'),
... ('eggs.py', 42, 'eggs', 'return "bacon"')])
>>>
traceback.
format_list([('spam.py', 3, '<module>', 'spam.eggs()'),
...
('eggs.py', 42, 'eggs', 'return "bacon"')])
[' File "spam.py", line 3, in <module>\n spam.eggs()\n',
' File "eggs.py", line 42, in eggs\n return "bacon"\n']
>>>
theError = IndexError('tuple ind
x out of range')
>>> traceback.format_exception_only(type(
theError), theE
rror)
>>>
an_error = IndexError('tuple inde
x out of range')
>>> traceback.format_exception_only(type(
an_error), an_e
rror)
['IndexError: tuple index out of range\n']
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