@@ -84,8 +84,11 @@ def format_list(extracted_list):
8484
8585 Each string in the resulting list corresponds to the item with the
8686 same index in the argument list. Each string ends in a newline;
87- the strings may contain internal newlines as well, for those items
88- whose source text line is not None.
87+ the strings may contain internal newlines as well, for items with
88+ column position information whose source text spans multiple physical
89+ lines. When column position information is unavailable, only
90+ the first physical line is displayed. Old-style tuples never have
91+ column position information.
8992 """
9093 return StackSummary .from_list (extracted_list ).format ()
9194
@@ -324,8 +327,8 @@ class FrameSummary:
324327 active when the frame was captured.
325328 - :attr:`name` The name of the function or method that was executing
326329 when the frame was captured.
327- - :attr:`line` The text from the linecache module for the line
328- of code that was running when the frame was captured.
330+ - :attr:`line` The first physical line of code that was running when
331+ the frame was captured.
329332 - :attr:`locals` Either None if locals were not supplied, or a dict
330333 mapping the name to the repr() of the variable.
331334 - :attr:`end_lineno` The last line number of the source code for this frame.
@@ -558,6 +561,11 @@ def from_list(klass, a_list):
558561 """
559562 Create a StackSummary object from a supplied list of
560563 FrameSummary objects or old-style list of tuples.
564+
565+ Old-style tuples do not have column position information, so only the
566+ first physical line of the line element is displayed when they are
567+ formatted. The same applies to FrameSummary objects without column
568+ position information.
561569 """
562570 # While doing a fast-path check for isinstance(a_list, StackSummary) is
563571 # appealing, idlelib.run.cleanup_traceback and other similar code may
@@ -794,8 +802,10 @@ def format(self, **kwargs):
794802
795803 Returns a list of strings ready for printing. Each string in the
796804 resulting list corresponds to a single frame from the stack.
797- Each string ends in a newline; the strings may contain internal
798- newlines as well, for those items with source text lines.
805+ Each string ends in a newline. For frames with column position
806+ information, the strings may contain internal newlines when the source
807+ text spans multiple physical lines. Otherwise, only the first physical
808+ line is displayed.
799809
800810 For long sequences of the same frame and line, the first few
801811 repetitions are shown, followed by a summary line stating the exact
0 commit comments