Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python 3.11 only] "Post-init processing" section of dataclasses contains duplicate sentences + malformatted code example #126462

Open
akabraham opened this issue Nov 5, 2024 · 0 comments
Labels
docs Documentation in the Doc dir topic-dataclasses

Comments

@akabraham
Copy link

akabraham commented Nov 5, 2024

Documentation

NOTE: Python 3.11 Docs Only

Issue:

The "Post-init processing" section of dataclasses in the Python 3.11 documentation contains duplicate sentences and a malformed code example. These issues aren't in the other active Python versions (i.e. 3.9, 3.10, 3.12, 3.13)

Proposed Fix:

The fix is to replace the 3.11 "Post-init processing" section with that of the 3.12 branch, which doesn't contain the duplicate sentences or bad formatting. To my knowledge, there are no new features added in 3.12 that makes this section incompatible with the 3.11 documentation, so it's safe to use it.

Screenshot of malformatted section in Python 3.11 documentation:
bug_python_3-11_dataclasses_postinit_processing

Screenshot of good section in Python 3.12 documentation:
fixed_python_3-12_dataclasses_postinit_processing

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-dataclasses
Projects
Status: Todo
Development

No branches or pull requests

2 participants