This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, pavel-lexyr, rhettinger, steven.daprano
Date 2021-07-28.21:37:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627508229.69.0.514866376157.issue44768@roundup.psfhosted.org>
In-reply-to
Content
I agree with Steven, but since I have this typed up I'll post it here.

Yes, iterability is another namedtuple feature. Although that would actually be easy to add to dataclasses, so I didn't mention it.

I don't really see the point of combining them, except for some conceptual purity argument.

You can already write a wrapper decorator which, given the various parameters to @dataclass, decides if it will produce a dataclass or a namedtuple. For example, there couldn't be any fields with init=False, or kwonly=True, the class would have to have frozen=True, etc.
History
Date User Action Args
2021-07-28 21:37:09eric.smithsetrecipients: + eric.smith, rhettinger, steven.daprano, pavel-lexyr
2021-07-28 21:37:09eric.smithsetmessageid: <1627508229.69.0.514866376157.issue44768@roundup.psfhosted.org>
2021-07-28 21:37:09eric.smithlinkissue44768 messages
2021-07-28 21:37:09eric.smithcreate