<div dir="ltr">Or we could just have two arguments, eq=<bool> and order=<bool>, and some rule so that you only need to specify one or the other but not both. (E.g. order=True implies eq=True.) That seems better than needing new constants just for this flag.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 11, 2017 at 6:49 PM, Barry Warsaw <span dir="ltr"><<a href="mailto:barry@python.org" target="_blank">barry@python.org</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 Sep 11, 2017, at 18:36, Eric V. Smith <<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>> wrote:<br>
> So if we don't do enums, I think the choices are ints, strs, or maybe True/False/None. Do you have a preference here?<br>
><br>
> If int or str, I assume we'd want module-level constants.<br>
><br>
> I like the name compare=, and 3 values makes sense: None, Equality, Ordered.<br>
<br>
</span>+1 for the name, the 3 values, and making them module constants. After that, I don’t think it really matters what their implementation is. User code will look the same either way. One minor nice effect of using an enum is that the dataclass function can use `is` instead of `==` to compare keyword argument values.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Barry<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>guido%40python.org</a><br>
<br></blockquote></div><br><br clear="all"><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>