From 0142d4a3df3f4c7f9bec7aa72f4b92cee7716f57 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 27 Apr 2009 16:22:44 +0000 Subject: [PATCH] Merged revisions 72007 via svnmerge from 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 1129745e333..ce5fe4591e5 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -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, '', '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']