From 6acd7d7c9fe70a466c210a501fc0a4f99ecfff4b Mon Sep 17 00:00:00 2001 From: CF Bolz-Tereick Date: Sat, 24 Aug 2024 14:16:39 +0200 Subject: [PATCH 1/3] gh-82378: document the difference between sys.tracebacklimit and the limit arguments --- Doc/library/traceback.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index bfd2c3efc4b1f6..3cacc8cecac3e0 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -42,6 +42,12 @@ The module defines the following functions: :term:`file ` or :term:`file-like object` to receive the output. + Note that the meaning of the *limit* parameter is different than the meaning + of :const:`sys.tracebacklimit`. Negative *limit* values correspond to + positive values of :const:`sys.tracebacklimit`, whereas the behaviour of + positive values of *limit* cannot be achieved with + :const:`sys.tracebacklimit`. + .. versionchanged:: 3.5 Added negative *limit* support. From 0de493411edf990a860ff0cdc6fae80b692667d9 Mon Sep 17 00:00:00 2001 From: CF Bolz-Tereick Date: Sun, 25 Aug 2024 17:52:17 +0200 Subject: [PATCH 2/3] Update Doc/library/traceback.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Doc/library/traceback.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 3cacc8cecac3e0..5d1fc1c3de0d8f 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -44,8 +44,8 @@ The module defines the following functions: Note that the meaning of the *limit* parameter is different than the meaning of :const:`sys.tracebacklimit`. Negative *limit* values correspond to - positive values of :const:`sys.tracebacklimit`, whereas the behaviour of - positive values of *limit* cannot be achieved with + positive values of :const:`sys.tracebacklimit`, whereas the behaviour of + positive *limit* values cannot be achieved with :const:`sys.tracebacklimit`. .. versionchanged:: 3.5 From a227ce57b681e91856e3834f4074c4a3dd67e65e Mon Sep 17 00:00:00 2001 From: CF Bolz-Tereick Date: Sun, 25 Aug 2024 18:35:34 +0200 Subject: [PATCH 3/3] Update Doc/library/traceback.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/library/traceback.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 5d1fc1c3de0d8f..401e12be45f418 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -42,11 +42,13 @@ The module defines the following functions: :term:`file ` or :term:`file-like object` to receive the output. - Note that the meaning of the *limit* parameter is different than the meaning - of :const:`sys.tracebacklimit`. Negative *limit* values correspond to - positive values of :const:`sys.tracebacklimit`, whereas the behaviour of - positive *limit* values cannot be achieved with - :const:`sys.tracebacklimit`. + .. note:: + + The meaning of the *limit* parameter is different than the meaning + of :const:`sys.tracebacklimit`. A negative *limit* value corresponds to + a positive value of :const:`!sys.tracebacklimit`, whereas the behaviour of + a positive *limit* value cannot be achieved with + :const:`!sys.tracebacklimit`. .. versionchanged:: 3.5 Added negative *limit* support.