Skip to content

gh-145896: Fix typos and stale docstrings in Lib/traceback.py#145897

Open
devdanzin wants to merge 4 commits intopython:mainfrom
devdanzin:traceback_typos
Open

gh-145896: Fix typos and stale docstrings in Lib/traceback.py#145897
devdanzin wants to merge 4 commits intopython:mainfrom
devdanzin:traceback_typos

Conversation

@devdanzin
Copy link
Member

@devdanzin devdanzin commented Mar 13, 2026

This PR fixes some typos and stale docstrings, as described by Claude Code:

  • Fix stale extract_tb() docstring: add end_lineno, colno, and end_colno to the listed FrameSummary attributes (available since 3.11)
  • Fix stale extract_stack() docstring: replace outdated "quadruple (filename, line number, function name, text)" with "FrameSummary object" (stale since 3.5)
  • Fix broken grammar in FrameSummary class docstring: "for the of code""for the code"
  • Fix inaccurate _display_width() docstring: "extra amount of width""amount of width" (the function returns total display width, not a delta)
  • Fix copy-paste typo in TracebackException.__init__ comment: "exc_traceback, exc_value, exc_traceback""exc_type, exc_value, exc_traceback"

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also check that any public doc matches this one (or is as long as the internal one) please?

@devdanzin
Copy link
Member Author

Not sure what you mean by "is as long as the internal one", but I've corrected the same staleness and some typos in the traceback public documentation.

@picnixz
Copy link
Member

picnixz commented Mar 22, 2026

By "as long as", I meant that we were precise enough in the public docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants