]> granicus.if.org Git - python/commitdiff
Merged revisions 72007 via svnmerge from
authorGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 16:22:44 +0000 (16:22 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 27 Apr 2009 16:22:44 +0000 (16:22 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72007 | georg.brandl | 2009-04-27 17:09:25 +0200 (Mo, 27 Apr 2009) | 1 line

  #5856: fix typo s in traceback example.
........

Doc/library/traceback.rst

index 1129745e333b8c3d4495bad7bd4b34fc667cf0a3..ce5fe4591e55edb17c900f43ba094b0763b0576e 100644 (file)
@@ -269,10 +269,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']