]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#5856: fix typo s in traceback example.
authorGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 15:09:25 +0000 (15:09 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 15:09:25 +0000 (15:09 +0000)
Doc/library/traceback.rst

index 126003785775b7d7b035e786fc82c9b65ba29436..31a4583c14f1cbe6021dd6e4bb64277b551b99a1 100644 (file)
@@ -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']