-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Minor doc issue: dataclasses.KW_ONLY not documented as inspected by dataclass() #99026
Comments
the issue has been assigned but i can't see any activity, i was wondering if i could get this done? 🤠 |
Sure. Create a PR and I'll look at it. |
ericvsmith
pushed a commit
that referenced
this issue
Jan 6, 2023
…h-100798) update dataclasses docs for when annotations are inspected
This was referenced Jan 6, 2023
Merged
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 6, 2023
…cted (pythongh-100798) update dataclasses docs for when annotations are inspected (cherry picked from commit 659c260) Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 6, 2023
…cted (pythongh-100798) update dataclasses docs for when annotations are inspected (cherry picked from commit 659c260) Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
miss-islington
added a commit
that referenced
this issue
Jan 6, 2023
miss-islington
added a commit
that referenced
this issue
Jan 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dataclasses documentation
According to dataclasses documentation, the only places "where dataclass() inspects a type annotation" are:
However, dataclasses.KW_ONLY logically must be (and actually is) the third place.
It's only a minor inconsistency, but it can be easily remedied (in a future-proof way, if ever a fourth, etc. place would be added) by changing:
(italics only to show the difference, not intended in the change)
Linked PRs
The text was updated successfully, but these errors were encountered: