File: README.rst

package info (click to toggle)
python-traceback2 1.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 188 kB
  • sloc: python: 1,017; makefile: 17
file content (17 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
A backport of traceback to older supported Pythons.

 >>> import traceback2 as traceback

Profit.

Things to be aware of!

In Python 2.x, unlike traceback, traceback2 creates unicode output (because it
depends on the linecache2 module).

Exception frame clearing silently does nothing if the interpreter in use does
not support it.

traceback2._some_str, which while not an official API is so old its likely in
use behaves similarly to the Python3 version - objects where unicode(obj) fails
but str(object) works will be shown as b'thestrvaluerepr'.