<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 3, 2017 at 1:28 PM, Eric V. Smith <span dir="ltr"><<a href="mailto:eric@trueblade.com" target="_blank">eric@trueblade.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/3/2017 3:33 PM, Antoine Pitrou wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, 2 Dec 2017 09:02:37 -0500<br>
"Eric V. Smith" <<a href="mailto:eric@trueblade.com" target="_blank">eric@trueblade.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've pushed another version of PEP 557. The only difference is changing<br>
the default value of "order" to False instead of True. This matches<br>
regular classes: instances can be tested for equality, but are unordered.<br>
<br>
Discussion at <a href="https://github.com/ericvsmith/dataclasses/issues/104" rel="noreferrer" target="_blank">https://github.com/ericvsmith/<wbr>dataclasses/issues/104</a><br>
<br>
It's already available at <a href="https://www.python.org/dev/peps/pep-0557/" rel="noreferrer" target="_blank">https://www.python.org/dev/pep<wbr>s/pep-0557/</a><br>
</blockquote>
<br>
Thanks.  I have to ask: why don't "asdict" and "astuple" respect PEP 8<br>
naming?<br>
</blockquote>
<br></span>
I guess it depends if you think the underscore is needed to improve readability. "Function names should be lowercase, with words separated by underscores as necessary to improve readability."<br>
<br>
I don't feel strongly enough about it to change it, but part of that is because I'm burned out on the PEP, so I might not be a good one to judge at this point. I guess if I clear my head and I were doing it from scratch again I'd make them as_dict and as_tuple, so maybe I should brush aside inertia and make the change.<span class="HOEnZb"><font color="#888888"></font></span><br></blockquote></div><br clear="all"></div><div class="gmail_extra">The Python stdlib is incredibly inconsistent where it comes to inserting underscores. I think in this case it matches `namedtuple._asdict()` and that's good enough for me.<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>