cpython: 86d062edb6ab (original) (raw)
Mercurial > cpython
changeset 102673:86d062edb6ab
Issue #26823: fix traceback abbreviation docs - be clear builtin traceback display was also updated - show example output in What's New - fix versionadded markup [#26823]
Nick Coghlan ncoghlan@gmail.com | |
---|---|
date | Tue, 16 Aug 2016 10:58:14 +1000 |
parents | 705416c5909e |
children | d277870a6012 |
files | Doc/library/traceback.rst Doc/whatsnew/3.6.rst |
diffstat | 2 files changed, 25 insertions(+), 6 deletions(-)[+] [-] Doc/library/traceback.rst 5 Doc/whatsnew/3.6.rst 26 |
line wrap: on
line diff
--- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -302,9 +302,8 @@ capture data for later printing in a lig repetitions are shown, followed by a summary line stating the exact number of further repetitions.
.. versionchanged:: 3.6[](#l1.10)
Long sequences of repeated frames are now abbreviated.[](#l1.11)
--- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -207,7 +207,12 @@ Example of fatal error on buffer overflo Other Language Changes ====================== -* None yet. +Some smaller changes made to the core Python language are: + +* Long sequences of repeated traceback lines are now abbreviated as
"[Previous line repeated {count} more times]"
(see- :ref:
py36-traceback
for an example). - (Contributed by Emanuel Barry in :issue:
26823
.) New Modules @@ -438,11 +443,26 @@ not work in future versions of Tcl. (Contributed by Serhiy Storchaka in :issue:22115
). +.. _py36-traceback: + traceback --------- -The :meth:~traceback.StackSummary.format
method now abbreviates long sequences -of repeated lines as"[Previous line repeated {count} more times]"
. +Both the traceback module and the interpreter's builtin exception display now +abbreviate long sequences of repeated lines in tracebacks as shown in the +following example:: + - ...
- Traceback (most recent call last):
File "<stdin>", line 1, in <module>[](#l2.36)
File "<stdin>", line 1, in f[](#l2.37)
File "<stdin>", line 1, in f[](#l2.38)
File "<stdin>", line 1, in f[](#l2.39)
[Previous line repeated 995 more times][](#l2.40)
- RecursionError: maximum recursion depth exceeded