<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 October 2017 at 14:49, Mike Miller <span dir="ltr"><<a href="mailto:python-dev@mgmiller.net" target="_blank">python-dev@mgmiller.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 2017-10-11 19:56, Nick Coghlan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From my perspective, the main benefit of a compound name like "data class" is that it emphasises a deliberate behavioural choice (adopted from attrs): data classes are just regular classes, with some definition time logic to help define data fields.<br>
</blockquote>
<br></span>
IMO, the problem with the dataclass name isn't the data part, but the "class" part. No other class has "class" in its name(?), not even object. The Department of Redundancy Department will love it.<br>
<br>
If it must be a compound name, it should rather be dataobject, no?<span class=""><br></span></blockquote><div><br></div>No, because dataclass is the name of a class decorator ("This class is a data class"), not the name of a type.</div><div class="gmail_quote"><br></div><div class="gmail_quote">It's akin to "static method", "class method", and "instance method" for function definitions (although the last one isn't a typical decorator, since it's the default behaviour for functions placed inside a class).<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Cheers,</div><div class="gmail_quote">Nick.<br></div><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Nick Coghlan | <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a> | Brisbane, Australia</div>
</div></div>