Skip to content

Conversation

RafaelWO
Copy link
Contributor

@RafaelWO RafaelWO commented Sep 20, 2025

This PR adds the changes discussed in #136791 that were missed before merging (see this comment) to the Enum documentation. That is, removing the duplicated sections __dunder__and _sunder_ names from the Enum HOWTO to the API documentation.

Additionally, the "Finer Points" heading on the Enum HOWTO page is moved one level out:

before after
grafik grafik

Finally, version indicators mentioned in the __dunder__ and _sunder_ sections are added to the corresponding Enum member in the API docs. Also, a note for the Enum member _generate_next_value_ is moved from the _sunder_ section to the API section..


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

RafaelWO and others added 3 commits September 14, 2025 16:58
To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also python#136791
Before this change, the section "Finer Points" was a subsection of
"When to use __new__() vs. __init__()" which does not make much sense.

This change moves "Finer Points" one level out making it a top level
section. All its subsections are moved as well.
The Enum members listed in the sections of `__dunder__` and `_sunder_`
did not have version indicators in the API docs.
This changes adds the version indicators mentioned in the  `__dunder__`
and `_sunder_` section to the corresponding Enum member.
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 20, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Sep 20, 2025
@RafaelWO RafaelWO changed the title Change/enum docs howto to api gh-136672: Docs: Move parts of Enum HOWTO to API Docs Sep 20, 2025
This changes moves a note for the Enum member `_generate_next_value_`
from the `_sunder_` section to the API section.
The intention is to let `_sunder_` section list all members
but have the details in the API section.
@RafaelWO RafaelWO force-pushed the change/enum-docs-howto-to-api branch from fc092d3 to ff84f94 Compare September 20, 2025 08:45
@AA-Turner AA-Turner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 21, 2025
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.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants