<div dir="ltr">On Mon, Dec 18, 2017 at 5:31 AM, Steve Barnes <span dir="ltr"><<a href="mailto:gadgetsteve@live.co.uk" target="_blank">gadgetsteve@live.co.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I see it as showing that the information is already available to anybody<br>
who needs it so I question the usefulness of changing repr (for<br>
everybody) <br><div>@dataclass<br></div><div>class C:<br></div><div>    a: "the a parameter" # field with no default<br></div>    b: "another, different parameter" = 0.0 # field with a default<br>.</blockquote><div><br></div><div>well, digging into inspect and all that is definitely an advanced process -- repr is for a quick look-see at the value of an object -- it would be great to have one that was more informative.<br><br></div><div>and in theory, the "goal" is for eval(repr(obj)) to return an equivelent object -- surely that would require showing the arguments and expression, yes?<br><br></div><div>But is it bound to break somethign somewhere? given how, well, useless the current lambda repr is, I can't imagine much breaking. But then I"ve been known to lack imagination :-)<br><br></div><div>As for "proper" functions, I think it's pretty much off the table -- they are simply too often complicated beasts with lots of parameters, lots of code, multiple return possibilities, etc.<br><br></div><div>Is there a downside other than possible breakage? Performance issue, maybe?<br><br></div><div>And with regards to breakage -- anyone have code that would break (yeah, I know, small sample, but if the answer is yes, lots, then we're done)<br><br></div><div>-Chris<br clear="all"></div></div><br>-- <br><div class="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>