Skip to content

bpo-42280: Clarify docs on standard generic collections#29308

Closed
AlexWaygood wants to merge 3 commits intopython:mainfrom
AlexWaygood:patch-1
Closed

bpo-42280: Clarify docs on standard generic collections#29308
AlexWaygood wants to merge 3 commits intopython:mainfrom
AlexWaygood:patch-1

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Oct 29, 2021

This PR proposes adding two classes to the list of standard generic collections in the docs. These classes can be parametrised at runtime, but are currently omitted from the list.

The PR also tweaks the wording introducing the list, to make clear that the docs are not promising that this is an exhaustive list.

The PR does not add any of the classes from the queue module (queue.Queue, queue.LifoQueue, queue.PriorityQueue, queue.SimpleQueue), even though these can be parametrised. I have excluded these from the PR, as the documentation states that this is a list of "standard-library collections", and the queue classes are not collections (they are neither sized, nor iterable). However, re.Pattern is included in this list, and re.Pattern objects are also not collections -- so, perhaps the queue classes should also be added to this list.

https://bugs.python.org/issue42280

Loading
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 needs backport to 3.10 only security fixes skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants