Skip to content

gh-155856: Rephrase doc for "iter" to avoid "collection" - #155857

Open
wjandrea wants to merge 1 commit into
python:mainfrom
wjandrea:patch-4
Open

gh-155856: Rephrase doc for "iter" to avoid "collection"#155857
wjandrea wants to merge 1 commit into
python:mainfrom
wjandrea:patch-4

Conversation

@wjandrea

@wjandrea wjandrea commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #155856 - The term "collection" is misleading.
Also add link to "sequence".

Comment thread Doc/library/functions.rst Outdated
Comment on lines +1150 to +1152
second argument, the single argument must be an object that supports the
:term:`iterable` protocol (the :meth:`~object.__iter__` method) or
the :term:`sequence` protocol (the :meth:`~object.__getitem__` method with integer arguments

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.

Can you avoid this diff and solely remove the word "collection" without reflowing the text please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I made a typo in my initial commit. Let me redo it and get back to you. Converted to draft PR for now.

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.

Usually, we don't care about nice commit messages as maintainers will either rewrite them or remove them and use the PR title as the sole commit message

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.

In particular, we prefer not having force-pushes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oops, sorry, I just did a force push. I don't really know what I'm doing with Git. Ready for review now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did more than just reflow the text. I also changed the wording and added a link.

@wjandrea
wjandrea marked this pull request as draft August 15, 2026 16:16
@read-the-docs-community

read-the-docs-community Bot commented Aug 15, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34082506 | 📁 Comparing 41f1d56 against main (948fd7e)

  🔍 Preview build  

1 file changed
± library/functions.html

Fixes python#155856 - The term "collection" is misleading.
Also add link to "sequence".
@wjandrea
wjandrea marked this pull request as ready for review August 15, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

iter() doesn't require a "collection"

2 participants