From 50260e9d020221ed7d802d64f1b17d0b5fc2b4b6 Mon Sep 17 00:00:00 2001 From: CF Bolz-Tereick Date: Mon, 26 Aug 2024 00:50:43 +0200 Subject: [PATCH] gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (GH-123286) (cherry picked from commit 70bfef52b5734d6cd81c5e8ca9eaf85658916b04) Co-authored-by: CF Bolz-Tereick --- Doc/library/traceback.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index 85dae82104a2dc..d3f47b9e4fb596 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -42,6 +42,14 @@ The module defines the following functions: :term:`file ` or :term:`file-like object` to receive the output. + .. 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.