@@ -70,10 +70,10 @@ def extract_tb(tb, limit=None):
7070 This is useful for alternate formatting of stack traces. If
7171 'limit' is omitted or None, all entries are extracted. A
7272 pre-processed stack trace entry is a FrameSummary object
73- containing attributes filename, lineno, name, and line
74- representing the information that is usually printed for a stack
75- trace. The line is a string with leading and trailing
76- whitespace stripped; if the source is not available it is None.
73+ representing the information that is usually printed for a
74+ stack trace. The line attribute is a string with
75+ leading and trailing whitespace stripped; if the source is not
76+ available the corresponding attribute is None.
7777 """
7878 return StackSummary ._extract_from_extended_frame_gen (
7979 _walk_tb_with_full_positions (tb ), limit = limit )
@@ -251,9 +251,8 @@ def extract_stack(f=None, limit=None):
251251
252252 The return value has the same format as for extract_tb(). The
253253 optional 'f' and 'limit' arguments have the same meaning as for
254- print_stack(). Each item in the list is a quadruple (filename,
255- line number, function name, text), and the entries are in order
256- from oldest to newest stack frame.
254+ print_stack(). Each item in the list is a FrameSummary object,
255+ and the entries are in order from oldest to newest stack frame.
257256 """
258257 if f is None :
259258 f = sys ._getframe ().f_back
@@ -281,7 +280,7 @@ class FrameSummary:
281280 active when the frame was captured.
282281 - :attr:`name` The name of the function or method that was executing
283282 when the frame was captured.
284- - :attr:`line` The text from the linecache module for the
283+ - :attr:`line` The text from the linecache module for the line
285284 of code that was running when the frame was captured.
286285 - :attr:`locals` Either None if locals were not supplied, or a dict
287286 mapping the name to the repr() of the variable.
@@ -951,7 +950,7 @@ def setup_positions(expr, force_valid=True):
951950_WIDE_CHAR_SPECIFIERS = "WF"
952951
953952def _display_width (line , offset = None ):
954- """Calculate the extra amount of width space the given source
953+ """Calculate the amount of width space the given source
955954 code segment might take if it were to be displayed on a fixed
956955 width output device. Supports wide unicode characters and emojis."""
957956
@@ -1037,7 +1036,7 @@ class TracebackException:
10371036 def __init__ (self , exc_type , exc_value , exc_traceback , * , limit = None ,
10381037 lookup_lines = True , capture_locals = False , compact = False ,
10391038 max_group_width = 15 , max_group_depth = 10 , save_exc_type = True , _seen = None ):
1040- # NB: we need to accept exc_traceback , exc_value, exc_traceback to
1039+ # NB: we need to accept exc_type , exc_value, exc_traceback to
10411040 # permit backwards compat with the existing API, otherwise we
10421041 # need stub thunk objects just to glue it together.
10431042 # Handle loops in __cause__ or __context__.
0 commit comments