]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-82378: Document the difference between sys.tracebacklimit and the limit...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 25 Aug 2024 22:57:16 +0000 (00:57 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Aug 2024 22:57:16 +0000 (22:57 +0000)
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 <cfbolz@gmx.de>
Doc/library/traceback.rst

index 85dae82104a2dc926ce69e6067bbde2d25c58520..d3f47b9e4fb596fa20b364a021fb56b38449c80a 100644 (file)
@@ -42,6 +42,14 @@ The module defines the following functions:
    :term:`file <file object>` 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.