<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 14, 2013 at 9:07 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 05/14/2013 06:57 PM, Don Spaulding wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, May 14, 2013 at 5:23 PM, Andrew Barnert <<a href="mailto:abarnert@yahoo.com" target="_blank">abarnert@yahoo.com</a> <mailto:<a href="mailto:abarnert@yahoo.com" target="_blank">abarnert@yahoo.com</a>>> wrote:<div>

<br>
<br>
    On May 14, 2013, at 12:53, Jonathan Eunice <<a href="mailto:jonathan.eunice@gmail.com" target="_blank">jonathan.eunice@gmail.com</a> <mailto:<a href="mailto:jonathan.eunice@gmail.com" target="_blank">jonathan.eunice@gmail.<u></u>com</a>>> wrote:<br>


<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    Using a compatible, separate implementation for |OrderedDict| is a fine way to gracefully extend the language, but<br>
    it leaves ordering only half-accomodated. Consider:<br>
<br>
    OrderedDict(a=2,  b=3,  c=7)<br>
<br>
</blockquote>
    If your proposal is to replace dict with OrderedDict, I think you need at least one use case besides OrderedDict's<br>
    constructor.<br>
<br>
<br>
I don't understand the dismissal of OrderedDict.__init__ as an invalid use case.<br>
</div></blockquote>
<br>
It's not being dismissed, but it's only one.  There are thousands of functions using **kwds that simply don't care about the order.  Should they all pay the performance price so that some tiny fraction can benefit?<br>


<br>
While it is correctly said that if performance is a Big Deal you shouldn't be using Python, we also are not interested in making it slower without a really good reason.<br></blockquote><div><br></div><div>I'm of the opinion that the status quo is "fast, but kinda wrong".  Ideally we'd have a "fast, and correct" implementation, but I'd settle for a "negligibly slower, but still correct" implementation.  Nobody wants Python 3-dot-next to be slower, but how much slower are we really talking about given that Raymond Hettinger recently proposed[0] a plain-old-dict implementation that uses less space, performs better,  and as an unintended side-effect just happens to maintain its initial order?<br>

<br>Aside from the performance impact, isn't any code that relies on any current ordering behavior of **kwargs broken by design?<br></div><div><br>[0]: <a href="http://mail.python.org/pipermail/python-dev/2012-December/123028.html" target="_blank">http://mail.python.org/pipermail/python-dev/2012-December/123028.html</a><br>

<br></div></div></div></div>