diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2016-08-10 05:35:27 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2016-08-10 05:35:27 (GMT) |
commit | c90fccdff6f5e72f1e4ff09ba1ba7697f70b0f4b (patch) | |
tree | 1904208f372f34cdcfa91ee08f28e0e92f9bf3af /Doc/library/traceback.rst | |
parent | 4032620f93f1be5447e2d7a893b4fcb08eba8eaa (diff) | |
download | cpython-c90fccdff6f5e72f1e4ff09ba1ba7697f70b0f4b.zip cpython-c90fccdff6f5e72f1e4ff09ba1ba7697f70b0f4b.tar.gz cpython-c90fccdff6f5e72f1e4ff09ba1ba7697f70b0f4b.tar.bz2 |
Issue #27208: Fix doctest in Doc/library/traceback.rst
Patch by Jelle Zijlstra.
Diffstat (limited to 'Doc/library/traceback.rst')
-rw-r--r-- | Doc/library/traceback.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 6ec9ada..3c1d9bb 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -361,7 +361,7 @@ exception and traceback: traceback.print_exception(exc_type, exc_value, exc_traceback, limit=2, file=sys.stdout) print("*** print_exc:") - traceback.print_exc() + traceback.print_exc(limit=2, file=sys.stdout) print("*** format_exc, first and last line:") formatted_lines = traceback.format_exc().splitlines() print(formatted_lines[0]) @@ -407,9 +407,9 @@ The output for the example would look similar to this: ' File "<doctest...>", line 7, in bright_side_of_death\n return tuple()[0]\n', 'IndexError: tuple index out of range\n'] *** extract_tb: - [('<doctest...>', 10, '<module>', 'lumberjack()'), - ('<doctest...>', 4, 'lumberjack', 'bright_side_of_death()'), - ('<doctest...>', 7, 'bright_side_of_death', 'return tuple()[0]')] + [<FrameSummary file <doctest...>, line 10 in <module>>, + <FrameSummary file <doctest...>, line 4 in lumberjack>, + <FrameSummary file <doctest...>, line 7 in bright_side_of_death>] *** format_tb: [' File "<doctest...>", line 10, in <module>\n lumberjack()\n', ' File "<doctest...>", line 4, in lumberjack\n bright_side_of_death()\n', |