File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1237,3 +1237,37 @@ Warning types
12371237
12381238.. versionadded :: 3.10
12391239 :c:data: `PyExc_EncodingWarning `.
1240+
1241+
1242+ Tracebacks
1243+ ==========
1244+
1245+ .. c :var :: PyTypeObject PyTraceBack_Type
1246+
1247+ Type object for traceback objects. This is available as
1248+ :class: `types.TracebackType ` in the Python layer.
1249+
1250+
1251+ .. c :function :: int PyTraceBack_Check (PyObject *op)
1252+
1253+ Return true if *op * is a traceback object, false otherwise. This function
1254+ does not account for subtypes.
1255+
1256+
1257+ .. c :function :: int PyTraceBack_Here (PyFrameObject *f)
1258+
1259+ Replace the :attr: `~BaseException.__traceback__ ` attribute on the current
1260+ exception with a new traceback prepending *f * to the existing chain.
1261+
1262+ Calling this function without an exception set is undefined behavior.
1263+
1264+ This function returns ``0 `` on success, and returns ``-1 `` with an
1265+ exception set on failure.
1266+
1267+
1268+ .. c :function :: int PyTraceBack_Print (PyObject *tb, PyObject *f)
1269+
1270+ Write the traceback *tb * into the file *f *.
1271+
1272+ This function returns ``0 `` on success, and returns ``-1 `` with an
1273+ exception set on failure.
You can’t perform that action at this time.
0 commit comments