@@ -15,6 +15,23 @@ Functions
15
15
function raise as `SystemExit ` exception. If an argument is given, its
16
16
value given as an argument to `SystemExit `.
17
17
18
+ .. function :: print_exception(exc, file=sys.stdout, /)
19
+
20
+ This function is being deprecated and will be removed starting in
21
+ CircuitPython 10.x, `traceback.print_exception() ` should be used instead.
22
+
23
+ Print exception with a traceback to a file-like object *file * (or
24
+ `sys.stdout ` by default).
25
+
26
+ .. admonition :: Difference to CPython
27
+ :class: attention
28
+
29
+ This is simplified version of a function which appears in the
30
+ `traceback ` module in CPython. Unlike `traceback.print_exception() `,
31
+ this function takes just exception value instead of exception type,
32
+ exception value, and traceback object; *file * argument should be
33
+ positional; further arguments are not supported.
34
+
18
35
Constants
19
36
---------
20
37
@@ -97,12 +114,6 @@ Constants
97
114
If you need to check whether your program runs on CircuitPython (vs other
98
115
Python implementation), use `sys.implementation ` instead.
99
116
100
- .. data :: ps1
101
- ps2
102
-
103
- Mutable attributes holding strings, which are used for the REPL prompt. The defaults
104
- give the standard Python prompt of ``>>> `` and ``... ``.
105
-
106
117
.. data :: stderr
107
118
108
119
Standard error ``stream ``.
@@ -115,14 +126,6 @@ Constants
115
126
116
127
Standard output ``stream ``.
117
128
118
- .. data :: tracebacklimit
119
-
120
- A mutable attribute holding an integer value which is the maximum number of traceback
121
- entries to store in an exception. Set to 0 to disable adding tracebacks. Defaults
122
- to 1000.
123
-
124
- Note: this is not available on all ports.
125
-
126
129
.. data :: version
127
130
128
131
Python language version that this implementation conforms to, as a string.
0 commit comments