From e1b79ce17e5e722a71b56234e66952fe7ccb8945 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 27 Apr 2009 15:09:25 +0000 Subject: #5856: fix typo s in traceback example. --- Doc/library/traceback.rst | 9 ++++----- 1 file 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, '', 'spam.eggs()'), - ... ('eggs.py', 42, 'eggs', 'return "bacon"')]) + >>> traceback.format_list([('spam.py', 3, '', 'spam.eggs()'), + ... ('eggs.py', 42, 'eggs', 'return "bacon"')]) [' File "spam.py", line 3, in \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'] -- cgit v0.12