bpo-42280: Clarify docs on standard generic collections#29308
Closed
AlexWaygood wants to merge 3 commits intopython:mainfrom
Closed
bpo-42280: Clarify docs on standard generic collections#29308AlexWaygood wants to merge 3 commits intopython:mainfrom
AlexWaygood wants to merge 3 commits intopython:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
queuemodule (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 thequeueclasses are not collections (they are neither sized, nor iterable). However,re.Patternis included in this list, andre.Patternobjects are also not collections -- so, perhaps thequeueclasses should also be added to this list.https://bugs.python.org/issue42280