Eric V. Smith <e...@trueblade.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36772>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to