@@ -74,10 +74,10 @@ def extract_tb(tb, limit=None):
7474 This is useful for alternate formatting of stack traces. If
7575 'limit' is omitted or None, all entries are extracted. A
7676 pre-processed stack trace entry is a FrameSummary object
77- containing attributes filename, lineno, name, and line
78- representing the information that is usually printed for a stack
79- trace. The line is a string with leading and trailing
80- whitespace stripped; if the source is not available it is None.
77+ representing the information that is usually printed for a
78+ stack trace. The line attribute is a string with
79+ leading and trailing whitespace stripped; if the source is not
80+ available the corresponding attribute is None.
8181 """
8282 return StackSummary ._extract_from_extended_frame_gen (
8383 _walk_tb_with_full_positions (tb ), limit = limit )
@@ -253,9 +253,8 @@ def extract_stack(f=None, limit=None):
253253
254254 The return value has the same format as for extract_tb(). The
255255 optional 'f' and 'limit' arguments have the same meaning as for
256- print_stack(). Each item in the list is a quadruple (filename,
257- line number, function name, text), and the entries are in order
258- from oldest to newest stack frame.
256+ print_stack(). Each item in the list is a FrameSummary object,
257+ and the entries are in order from oldest to newest stack frame.
259258 """
260259 if f is None :
261260 f = sys ._getframe ().f_back
@@ -283,7 +282,7 @@ class FrameSummary:
283282 active when the frame was captured.
284283 - :attr:`name` The name of the function or method that was executing
285284 when the frame was captured.
286- - :attr:`line` The text from the linecache module for the
285+ - :attr:`line` The text from the linecache module for the line
287286 of code that was running when the frame was captured.
288287 - :attr:`locals` Either None if locals were not supplied, or a dict
289288 mapping the name to the repr() of the variable.
@@ -958,7 +957,7 @@ def setup_positions(expr, force_valid=True):
958957_WIDE_CHAR_SPECIFIERS = "WF"
959958
960959def _display_width (line , offset = None ):
961- """Calculate the extra amount of width space the given source
960+ """Calculate the amount of width space the given source
962961 code segment might take if it were to be displayed on a fixed
963962 width output device. Supports wide unicode characters and emojis."""
964963
@@ -1044,7 +1043,7 @@ class TracebackException:
10441043 def __init__ (self , exc_type , exc_value , exc_traceback , * , limit = None ,
10451044 lookup_lines = True , capture_locals = False , compact = False ,
10461045 max_group_width = 15 , max_group_depth = 10 , save_exc_type = True , _seen = None ):
1047- # NB: we need to accept exc_traceback , exc_value, exc_traceback to
1046+ # NB: we need to accept exc_type , exc_value, exc_traceback to
10481047 # permit backwards compat with the existing API, otherwise we
10491048 # need stub thunk objects just to glue it together.
10501049 # Handle loops in __cause__ or __context__.
0 commit comments