summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2016-08-16 00:58:14 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2016-08-16 00:58:14 (GMT)
commit02d03dfab1fc0b41c5afed862d9f659e733283d6 (patch)
tree2a6d674e6dd97fea0fe1aec2332e783ec80e72f7 /Doc/whatsnew
parentb09b3f7ab9c69eaad09a9b495cdcdb108a5898ac (diff)
downloadcpython-02d03dfab1fc0b41c5afed862d9f659e733283d6.zip
cpython-02d03dfab1fc0b41c5afed862d9f659e733283d6.tar.gz
cpython-02d03dfab1fc0b41c5afed862d9f659e733283d6.tar.bz2
Issue #26823: fix traceback abbreviation docs
- be clear builtin traceback display was also updated - show example output in What's New - fix versionadded markup
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.6.rst26
1 files changed, 23 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index 9050abc..49e8ed8 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -207,7 +207,12 @@ Example of fatal error on buffer overflow using
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::
+
+ >>> def f(): f()
+ ...
+ >>> f()
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ File "<stdin>", line 1, in f
+ File "<stdin>", line 1, in f
+ File "<stdin>", line 1, in f
+ [Previous line repeated 995 more times]
+ RecursionError: maximum recursion depth exceeded
+
(Contributed by Emanuel Barry in :issue:`26823`.)