summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-27 15:09:25 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-27 15:09:25 (GMT)
commite1b79ce17e5e722a71b56234e66952fe7ccb8945 (patch)
tree491586340b47a77cf5eb9735bc04d779a23e1bea /Doc
parente34d6aa86fbf889def9ce6b40d4578e9741a693f (diff)
downloadcpython-e1b79ce17e5e722a71b56234e66952fe7ccb8945.zip
cpython-e1b79ce17e5e722a71b56234e66952fe7ccb8945.tar.gz
cpython-e1b79ce17e5e722a71b56234e66952fe7ccb8945.tar.bz2
#5856: fix typo s in traceback example.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/traceback.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst
index 1260037..31a4583 100644
--- a/Doc/library/traceback.rst
+++ b/Doc/library/traceback.rst
@@ -1,4 +1,3 @@
-
: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 indx out of range')
- >>> traceback.format_exception_only(type(theError), theError)
+ >>> an_error = IndexError('tuple index out of range')
+ >>> traceback.format_exception_only(type(an_error), an_error)
['IndexError: tuple index out of range\n']