Closed
Description
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
- gh-99908 Update class documentation to use a modernized example #100433
- gh-99908 Update 'odds and ends'
class
documentation #100498 - gh-99908: Tutorial: Modernize the 'data-record class' example #100499
- [3.10] gh-99908: Tutorial: Modernize the 'data-record class' example (GH-100499) #100500
- [3.11] gh-99908: Tutorial: Modernize the 'data-record class' example (GH-100499) #100501