<div dir="ltr">On Sat, Dec 30, 2017 at 7:27 AM, Stephen J. Turnbull <span dir="ltr"><<a href="mailto:turnbull.stephen.fw@u.tsukuba.ac.jp" target="_blank">turnbull.stephen.fw@u.tsukuba.ac.jp</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">  Just use the simple rule that a new<br>
__repr__ is generated unless provided in the dataclass.<br></blockquote><div><br></div><div>are we only talking about __repr__ here ???<br><br></div><div>I interpretted Guido's proposal as being about all methods -- we _may_ want something special for __repr__, but I hope not.<br><br></div><div>But +1 for Guido's proposal, not only because it's easy to explain, but because it more naturally follows the usual inheritance logic:<br><br></div><div>The decorator's entire point is to auto-generate boilerplate code for you. Once it's done that it shouldn't, in the end, behave any differently than if you hand wrote that code. If you hand wrote the methods that the decorator creates for you, they would override any base class versions. So that's what it should do. <br><br></div><div>And the fact that you can optionally tell it not to in some particular case keeps full flexibility.<br><br></div><div>-CHB<br><br></div>> I grant that there may be many reasons why one would be deriving<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
dataclasses from dataclasses</blockquote><div><br></div>Will you get the "right" __repr__ now if you derive a datacalss from a dataclass? That would be a nice feature.<br></div><div class="gmail_quote"><div> <br></div><div>-CHB<br><br></div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>