@@ -218,7 +218,7 @@ The module also defines the following classes:
218218:class: `TracebackException ` objects are created from actual exceptions to
219219capture data for later printing in a lightweight fashion.
220220
221- .. class :: TracebackException(exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False, compact=False)
221+ .. class :: TracebackException(exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False, compact=False, max_group_width=15, max_group_depth=10 )
222222
223223 Capture an exception for later rendering. *limit *, *lookup_lines * and
224224 *capture_locals * are as for the :class: `StackSummary ` class.
@@ -230,6 +230,12 @@ capture data for later printing in a lightweight fashion.
230230
231231 Note that when locals are captured, they are also shown in the traceback.
232232
233+ *max_group_width * and *max_group_depth * control the formatting of exception
234+ groups (see :exc: `BaseExceptionGroup `). The depth refers to the nesting
235+ level of the group, and the width refers to the size of a single exception
236+ group's exceptions array. The formatted output is truncated when either
237+ limit is exceeded.
238+
233239 .. attribute :: __cause__
234240
235241 A :class: `TracebackException ` of the original ``__cause__ ``.
@@ -238,6 +244,14 @@ capture data for later printing in a lightweight fashion.
238244
239245 A :class: `TracebackException ` of the original ``__context__ ``.
240246
247+ .. attribute :: exceptions
248+
249+ If ``self `` represents an :exc: `ExceptionGroup `, this field holds a list of
250+ :class: `TracebackException ` instances representing the nested exceptions.
251+ Otherwise it is ``None ``.
252+
253+ .. versionadded :: 3.11
254+
241255 .. attribute :: __suppress_context__
242256
243257 The ``__suppress_context__ `` value from the original exception.
@@ -323,6 +337,9 @@ capture data for later printing in a lightweight fashion.
323337 .. versionchanged :: 3.10
324338 Added the *compact * parameter.
325339
340+ .. versionchanged :: 3.11
341+ Added the *max_group_width * and *max_group_depth * parameters.
342+
326343
327344:class: `StackSummary ` Objects
328345-----------------------------
0 commit comments