Issue 22169: sys.tracebacklimit = 0 does not work as documented in 3.x (original) (raw)

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