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

classes odds and ends could mention dataclasses #99908

Closed
gpshead opened this issue Nov 30, 2022 · 2 comments
Closed

classes odds and ends could mention dataclasses #99908

gpshead opened this issue Nov 30, 2022 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@gpshead
Copy link
Member

gpshead commented Nov 30, 2022

Documentation

https://docs.python.org/3/tutorial/classes.html#odds-and-ends

"Sometimes it is useful to have a data type similar to the Pascal “record” or C “struct”, bundling together a few named data items. An empty class definition will do nicely:"

This does not mention dataclasses but the use case it covers makes sense for that. Should the tutorial go there?

Linked PRs

@gpshead gpshead added the docs Documentation in the Doc dir label Nov 30, 2022
@ramvikrams
Copy link
Contributor

ramvikrams commented Nov 30, 2022

i'll do that, but all you wan't is the updation of the example given there

JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 22, 2022
JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 22, 2022
JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 22, 2022
JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 23, 2022
JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 24, 2022
JosephSBoyle pushed a commit to JosephSBoyle/cpython that referenced this issue Dec 24, 2022
AlexWaygood added a commit that referenced this issue Dec 24, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 24, 2022
…ythonGH-100499)

(cherry picked from commit 00afa50)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 24, 2022
…ythonGH-100499)

(cherry picked from commit 00afa50)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington added a commit that referenced this issue Dec 24, 2022
)

(cherry picked from commit 00afa50)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington added a commit that referenced this issue Dec 24, 2022
)

(cherry picked from commit 00afa50)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood
Copy link
Member

AlexWaygood commented Dec 24, 2022

Fixed on main, and backported to 3.11 and 3.10. Thanks @JosephSBoyle!

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
Projects
None yet
Development

No branches or pull requests

3 participants