Skip to content

Typos and stale docstrings in Lib/traceback.py #145896

@devdanzin

Description

@devdanzin

Bug report

Bug description:

Typos and stale docstrings in Lib/traceback.py found by Claude Code using code-review-toolkit:

  1. Comment typo "exc_traceback, exc_value, exc_traceback" — exc_type omitted, exc_traceback duplicated. [traceback.py:1063]
  2. FrameSummary class docstring has broken grammar: "for the of code" should be "for the line of code". [traceback.py:296]
  3. extract_stack docstring says items are "quadruples" — stale since Python 3.5, should reference FrameSummary objects. [traceback.py:261-268]
  4. extract_tb docstring lists only 4 attributes — omits end_lineno, colno, end_colno added in 3.11. [traceback.py:78-89]
  5. _display_width docstring says "extra amount of width space" — it returns total display width, not a delta. [traceback.py:976-979]

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions