Good videos, with context.
Raymond Hettinger - Dataclasses:  The code generator to end all code generators - PyCon 2018

Raymond Hettinger - Dataclasses: The code generator to end all code generators - PyCon 2018

PyCon 2018
2 HN recommenders · discussed 2018–2021
Open YouTube ↗

About this video

Raymond Hettinger explains Python's dataclasses module, showing the problem it solves and its key design decisions. He places it in a progression from tuples and dicts through named tuples and attrs.

Why it appears in the archive

HN commenters recommend it as an approachable talk from a respected Python core developer on dataclasses.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

sn9 · 2018-12 · rec

Some of my favorite talks from Strange Loop: * Contracts For Getting More Programs Less Wrong: [LINK] * "It's Just Matrix Multiplication": Notation for Weaving: [LINK] * Hackett: a metaprogrammable Haskell: [LINK] * Git from the Ground Up: [LINK] From PyCon: * Beyond Unit Tests: Taking Your Testing to the Next Level: [LINK] * Dataclasses: The code generator to end all code generator: [VIDEO] * Automating Code Quality: [LINK] There are probably more I might add later as I remember them.

Read original comment ↗
kzrdude · 2021-05 · rec

Raymond Hettinger's talks are great. I know it's not a succint blog post, but they are out there are watching a video is very approachable. Maybe [VIDEO] (Dataclasses! We could cheekily say Python gets better at something Rust does - dataclasses makes Python better at records.) And [LINK] This talk (2013): [LINK] Unfortunately this video is now a bit out of touch with modern Python. Another (2013) classic: [LINK] it is very well known, and it has the very memorable advice: what's a class that only has one method? That should be a function!

Read original comment ↗
lunchladydoris · 2018-05 · reference

I haven't watched it yet but I saw that Raymond Hettinger presented on data classes at PyCon last week [0]. [0]: [VIDEO]

Read original comment ↗
neuland · 2018-05 · reference

The standard library is not going to have more advanced features than what the community can do, if only because of the release cycle. Meanwhile, I was not a user of attrs before, rather I used collections.namedtuple and then typing.NamedTuple. So, data classes is a win for me and other people like me who weren't using attrs. And you can continue to use attrs without being bothered at all. In Raymond Hettinger's talk [0] at PyCon 2018, he even says that more features from attrs will likely get added, such as data validation [1]. And that his talk was the one chance for the developer (Eric Smith) to get praise, because everyone is going to instantly second guess every decision he made. [0] [VIDEO] [1] see 42:36 on future directions

Read original comment ↗