Hacker News new | ask | show | jobs
by dfee 2951 days ago
The article doesn't discuss slots and default values. Here's the actual reference implementation for dataclasses where it's discussed: https://github.com/ericvsmith/dataclasses/issues/28

Your second solution works fine (and is what I'd referenced). For your first solution, I'd again redirect you to my statement "they don’t support __slots__ and default values" and the above link.

1 comments

It’s not my solution, just a direct quote from PEP.