gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes#150682
Open
gaborbernat wants to merge 1 commit into
Open
gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes#150682gaborbernat wants to merge 1 commit into
gaborbernat wants to merge 1 commit into
Conversation
…e as classes NoneType, NotImplementedType and EllipsisType are classes, but were documented with the ".. data::" directive. Unlike the other type objects in the types module they are sometimes referenced as the type of a singleton value, so this is proposed separately from the uncontroversial cases. Switch the three entries to ".. class::", matching the other type objects and the What's New in 3.10 note that introduced them as classes, and update the ":data:" references in constants and the 3.10 What's New page.
Documentation build overview
|
Member
|
Please,a void opening automated PRs in a bulk. I'm still not convinced by changing every occurrences mechanically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
types.NoneType,types.NotImplementedType, andtypes.EllipsisTypeare classes, but the documentation marks them with the.. data::directive. This part of gh-89554 is worth a separate look: unlike the descriptor and function type objects, these three are sometimes referenced as:data:, as the type of a singleton value such asNone.This proposes switching them to
.. class::, matching the other type objects intypes.rstand the What's New in 3.10 entry that introduced them, which already describes them as "classes". It also updates the:data:references inDoc/library/constants.rstandDoc/whatsnew/3.10.rstto:class:.I am happy to drop this if you would rather keep
.. data::for the singleton-value types. It is split out from the uncontroversial cases in #150676 so the decision can be made on its own.Refs: gh-89554. Documentation-only change, so no
Misc/NEWSentry (skip news).cc @AA-Turner as the
Lib/types.pymaintainer.