py/modsys: Add optional sys.tracebacklimit attribute.

With behaviour as per CPython.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-07-27 00:41:27 +10:00
parent bc181550a4
commit cac939ddc3
10 changed files with 117 additions and 3 deletions

View File

@@ -144,6 +144,14 @@ Constants
Standard output `stream`.
.. data:: tracebacklimit
A mutable attribute holding an integer value which is the maximum number of traceback
entries to store in an exception. Set to 0 to disable adding tracebacks. Defaults
to 1000.
Note: this is not available on all ports.
.. data:: version
Python language version that this implementation conforms to, as a string.