This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sys.tracebacklimit = 0 does not work as documented in 3.x
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: 3.x ignores sys.tracebacklimit=0
View: 12276
Assigned To: Nosy List: ned.deily, orlp
Priority: normal Keywords:

Created on 2014-08-08 03:24 by orlp, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg225055 - (view) Author: Orson Peters (orlp) Date: 2014-08-08 03:24
According to the documentation of sys.tracebacklimit, setting it to 0 or less would assure "all traceback information is suppressed and only the exception type and value are printed".

This is not the case:

    $ python -c "import sys; sys.tracebacklimit = 0; raise Exception()"
    Exception

    $ python3 -c "import sys; sys.tracebacklimit = 0; raise Exception()"
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    Exception
msg225058 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-08-08 03:28
This appears to be a duplicate of open Issue12276.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66365
2014-08-08 03:28:13ned.deilysetstatus: open -> closed

superseder: 3.x ignores sys.tracebacklimit=0

nosy: + ned.deily
messages: + msg225058
resolution: duplicate
stage: resolved
2014-08-08 03:24:54orlpcreate