Skip to content

GH-138465: Improve documentation for common sequence methods#138474

Merged
AA-Turner merged 7 commits into
python:mainfrom
AA-Turner:docs/refwarn/stdtypes-methods
Sep 5, 2025
Merged

GH-138465: Improve documentation for common sequence methods#138474
AA-Turner merged 7 commits into
python:mainfrom
AA-Turner:docs/refwarn/stdtypes-methods

Conversation

@AA-Turner

@AA-Turner AA-Turner commented Sep 3, 2025

Copy link
Copy Markdown
Member

cc @serhiy-storchaka

As part of this I've gone through the rest of the documentation and updated cross-references to use sequence.{method} / list.{method} etc as appropriate.

A


📚 Documentation preview 📚: https://cpython-previews--138474.org.readthedocs.build/

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great!

Comment thread Doc/library/stdtypes.rst Outdated
Comment thread Doc/library/stdtypes.rst Outdated
Comment thread Doc/library/stdtypes.rst Outdated
Comment thread Doc/library/stdtypes.rst
Comment thread Doc/library/stdtypes.rst
Comment thread Doc/library/stdtypes.rst
Mutable sequences should provide methods :meth:`~sequence.append`,
:meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~sequence.extend`,
:meth:`~sequence.insert`, :meth:`~sequence.pop`, :meth:`~sequence.remove`,
:meth:`~sequence.reverse` and :meth:`~sequence.sort`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sequence.sort does not exist. But sequence.clear was omitted.

@AA-Turner AA-Turner Sep 5, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is unchanged text (the only difference is fixed cross-references). Please could we leave it to a different issue to change, if needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Opened #138562

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. 👍

@AA-Turner AA-Turner merged commit 8ed1d53 into python:main Sep 5, 2025
31 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@AA-Turner AA-Turner deleted the docs/refwarn/stdtypes-methods branch September 5, 2025 19:55
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 5, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 5, 2025
…ythonGH-138474)

(cherry picked from commit 8ed1d53)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app

Copy link
Copy Markdown

Sorry, @AA-Turner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8ed1d53e62aa9acb9a0674f479cfe4d06622b911 3.13

@bedevere-app

bedevere-app Bot commented Sep 5, 2025

Copy link
Copy Markdown

GH-138560 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 5, 2025
AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Sep 5, 2025
…hods (pythonGH-138474)

(cherry picked from commit 8ed1d53)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Sep 5, 2025

Copy link
Copy Markdown

GH-138567 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 5, 2025
AA-Turner added a commit that referenced this pull request Sep 5, 2025
…H-138474) (#138567)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
hugovk pushed a commit that referenced this pull request Sep 6, 2025
…H-138474) (#138560)

GH-138465: Improve documentation for common sequence methods (GH-138474)
(cherry picked from commit 8ed1d53)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…hods (pythonGH-138474) (python#138560)

pythonGH-138465: Improve documentation for common sequence methods (pythonGH-138474)
(cherry picked from commit 8ed1d53)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
lkollar pushed a commit to lkollar/cpython that referenced this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants