On Tue, May 05, 2020 at 02:55:24PM +0200, Alex Hall wrote:
> Perhaps we should take the energy that is going into this thread and direct
> it towards supporting keyword-only arguments in dataclasses, a discussion
> which is apparently struggling:
Why? How are dataclasses relevant (don't assume it is as obvious to
everyone as it may be to you)? I'm especially interested in how
dataclasses may help me solve the DRY problem for module-level
functions:
def function(spam, eggs, cheese, aardvark):
do stuff
call _private_function(spam, eggs, cheese, aardvark)
since this bites me about twice as often as the `self.spam = spam`
issue.
(That's not me being snarky by the way, it's a genuine question:
dataclasses are a mystery to me, so I don't know what they can and can't
do.)
--
Steven
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/ECA4EHXIPF2SIY4V667BQ3VFMT4HUAEN/
Code of Conduct: http://python.org/psf/codeofconduct/