X Tutup
The Wayback Machine - https://web.archive.org/web/20221231112913/https://github.com/python/cpython/issues/100633
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

[tutorial/classes.html] odds and ends dataclasses sample code typo dataclasses #100633

Open
peterjpxie opened this issue Dec 31, 2022 · 4 comments · Fixed by #100638
Open

[tutorial/classes.html] odds and ends dataclasses sample code typo dataclasses #100633

peterjpxie opened this issue Dec 31, 2022 · 4 comments · Fixed by #100638
Assignees
Labels
3.10 3.11 3.12 docs Documentation in the Doc dir easy

Comments

@peterjpxie
Copy link

peterjpxie commented Dec 31, 2022

Documentation

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

There is a typo in the sample code. import dataclasses should be import dataclass.

from dataclasses import dataclasses

@dataclass
class Employee:
    name: str
    dept: str
    salary: int

It was introduced in this PR.

Linked PRs

@peterjpxie peterjpxie added the docs Documentation in the Doc dir label Dec 31, 2022
@sobolevn
Copy link
Member

sobolevn commented Dec 31, 2022

@peterjpxie this would be a good first PR :)
Do you have time to fix it?

@peterjpxie
Copy link
Author

peterjpxie commented Dec 31, 2022

@ericvsmith Thanks for fixing it.

@ericvsmith
Copy link
Member

ericvsmith commented Dec 31, 2022

I didn't fix it! I just assigned it to myself. If you want to produce a pull request, I'll commit it.

AlexWaygood pushed a commit that referenced this issue Dec 31, 2022
import dataclass not dataclasses from dataclasses
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 31, 2022
import dataclass not dataclasses from dataclasses
(cherry picked from commit 98308db)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 31, 2022
import dataclass not dataclasses from dataclasses
(cherry picked from commit 98308dbeb110198ebe28bdb7720d3671b3e7f57b)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
@AlexWaygood
Copy link
Member

AlexWaygood commented Dec 31, 2022

This is now fixed on main, but the CLA bot seems unhappy with the backports for some reason. I've no idea why, since the bot seemed perfectly happy that @OTheDev had signed it for the original PR :(

@AlexWaygood AlexWaygood reopened this Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 3.11 3.12 docs Documentation in the Doc dir easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
X Tutup