@@ -115,10 +115,10 @@ def extract_tb(tb, limit=None):
115115 This is useful for alternate formatting of stack traces. If
116116 'limit' is omitted or None, all entries are extracted. A
117117 pre-processed stack trace entry is a FrameSummary object
118- containing attributes filename, lineno, name, and line
119- representing the information that is usually printed for a stack
120- trace. The line is a string with leading and trailing
121- whitespace stripped; if the source is not available it is None.
118+ representing the information that is usually printed for a
119+ stack trace. The line attribute is a string with
120+ leading and trailing whitespace stripped; if the source is not
121+ available the corresponding attribute is None.
122122 """
123123 return StackSummary ._extract_from_extended_frame_gen (
124124 _walk_tb_with_full_positions (tb ), limit = limit )
@@ -295,9 +295,8 @@ def extract_stack(f=None, limit=None):
295295
296296 The return value has the same format as for extract_tb(). The
297297 optional 'f' and 'limit' arguments have the same meaning as for
298- print_stack(). Each item in the list is a quadruple (filename,
299- line number, function name, text), and the entries are in order
300- from oldest to newest stack frame.
298+ print_stack(). Each item in the list is a FrameSummary object,
299+ and the entries are in order from oldest to newest stack frame.
301300 """
302301 if f is None :
303302 f = sys ._getframe ().f_back
@@ -325,7 +324,7 @@ class FrameSummary:
325324 active when the frame was captured.
326325 - :attr:`name` The name of the function or method that was executing
327326 when the frame was captured.
328- - :attr:`line` The text from the linecache module for the
327+ - :attr:`line` The text from the linecache module for the line
329328 of code that was running when the frame was captured.
330329 - :attr:`locals` Either None if locals were not supplied, or a dict
331330 mapping the name to the repr() of the variable.
@@ -1053,7 +1052,7 @@ def _wlen(s: str) -> int:
10531052
10541053
10551054def _display_width (line , offset = None ):
1056- """Calculate the extra amount of width space the given source
1055+ """Calculate the amount of width space the given source
10571056 code segment might take if it were to be displayed on a fixed
10581057 width output device. Supports wide unicode characters and emojis."""
10591058
@@ -1134,7 +1133,7 @@ class TracebackException:
11341133 def __init__ (self , exc_type , exc_value , exc_traceback , * , limit = None ,
11351134 lookup_lines = True , capture_locals = False , compact = False ,
11361135 max_group_width = 15 , max_group_depth = 10 , save_exc_type = True , _seen = None ):
1137- # NB: we need to accept exc_traceback , exc_value, exc_traceback to
1136+ # NB: we need to accept exc_type , exc_value, exc_traceback to
11381137 # permit backwards compat with the existing API, otherwise we
11391138 # need stub thunk objects just to glue it together.
11401139 # Handle loops in __cause__ or __context__.
0 commit comments