Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/library/traceback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ in a :ref:`traceback <traceback-objects>`.

A string representing the source code for this frame, with leading and
trailing whitespace stripped.
It is a single line, the one at :attr:`~FrameSummary.lineno`, even if
the source code for this frame spans several lines.
If the source is not available, it is ``None``.

.. attribute:: FrameSummary.end_lineno
Expand Down
3 changes: 2 additions & 1 deletion Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ class FrameSummary:
- :attr:`name` The name of the function or method that was executing
when the frame was captured.
- :attr:`line` The text from the linecache module for the line
of code that was running when the frame was captured.
of code that was running when the frame was captured. It is a
single line, even if the code spans several lines.
- :attr:`locals` Either None if locals were not supplied, or a dict
mapping the name to the repr() of the variable.
- :attr:`end_lineno` The last line number of the source code for this frame.
Expand Down
Loading