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, gvanrossum, rhettinger, serhiy.storchaka
Date 2019-05-02.08:18:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556785096.79.0.223245511019.issue36772@roundup.psfhosted.org>
In-reply-to
Content
The 90% use case with dataclasses is satisfied with just "@dataclass", and perhaps the target user there is less sophisticated.

But the main difference between @dataclass and @lru_cache is that all of the parameters to @dataclass are keyword-only. Which I did because they are mostly all booleans, and "@dataclass(True, False, True)" isn't very helpful.

That's not the case with @lru_cache. Whether that makes a difference for this issue in particular, I'm not sure.

I agree that this violates "only one way to do it". But I haven't seen anyone use "@dataclass()", and I've also never seen anyone be confused by the fact that once you want parameters, you change to using parens. For the dataclass case, I think that working both ways has been helpful.
History
Date User Action Args
2019-05-02 08:18:16eric.smithsetrecipients: + eric.smith, gvanrossum, rhettinger, serhiy.storchaka
2019-05-02 08:18:16eric.smithsetmessageid: <1556785096.79.0.223245511019.issue36772@roundup.psfhosted.org>
2019-05-02 08:18:16eric.smithlinkissue36772 messages
2019-05-02 08:18:16eric.smithcreate