<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 12/26/17 1:49 PM, Chris Barker wrote:<br>
<blockquote type="cite"
cite="mid:CALGmxELQp+c5-AGyky_+SjFYY-VeMuPAOh=nVwUH9Hz5f8D1Pg@mail.gmail.com">
<div dir="ltr">On Sat, Dec 23, 2017 at 5:54 PM, Nick Coghlan <span
dir="ltr"><<a href="mailto:ncoghlan@gmail.com"
target="_blank" moz-do-not-send="true">ncoghlan@gmail.com</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<div dir="auto">
<div dir="auto">I still wonder about the "fields *must*
be annotated" constraint though. I can understand a
constraint that the style be *consistent* (i.e. all
fields as annotations, or all fields as field
instances), since that's needed to determine the field
order, but I don't see the problem with the "no
annotations" style otherwise.</div>
</div>
</blockquote>
<div><br>
</div>
<div>IIUC, without annotations, there is no way to set a
field with no default.<br>
<br>
</div>
<div>And supporting both approaches violates "only one way
to do it" in, I think, a confusing manner -- particularly
if you can't mix and match them.<br>
<br>
</div>
<div>Also, could does using class attributes without
annotations make a mess when subclassing? -- no I haven't
thought that out yet.<br>
<br>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
I have not been following the design of dataclasses, and maybe I'm
misunderstanding the state of the work. My impression is that attrs
was a thing, and lots of people loved it, so we wanted something
like it in the stdlib. Data Classes is that thing, but it is a new
thing being designed from scratch. There are still big questions
about how it should work, but it is already a part of 3.7.<br>
<br>
Often when people propose new things, we say, "Put it on PyPI first,
and let's see how people like it."Â Why isn't that the path for Data
Classes? Why are they already part of 3.7 when we have no practical
experience with them? Wouldn't it be better to let the design
mature with real experience? Especially since some of the questions
being asked are about how it interrelates with another large new
feature with little practical use yet (typing)?<br>
<br>
--Ned.<br>
</body>
</html>