<div dir="ltr">Hi Guys,<div>please don't do it!</div><div>We don't need this legacy really.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 21 April 2014 08:41, Armin Rigo <span dir="ltr"><<a href="mailto:arigo@tunes.org" target="_blank">arigo@tunes.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Nick,<br><div class=""><br>On 21 April 2014 07:39, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
> Notably, I recommend that hybrid code avoid calling mapping iteration<br>> methods directly, and instead rely on builtin functions where possible,<br>> and some additional helper functions for cases that would be a simple<br>
> combination of a builtin and a mapping method in pure Python 3 code, but<br>> need to be handled slightly differently to get the exact same semantics in<br>> Python 2.<br><br></div>How about explicitly noting that in Python 2, a large fraction of<br>
usages of the iterkeys(), itervalues() and iteritems() methods (that's<br>more than 99% in my experience, but I might be biased) should just be<br>written as keys(), values() and items() in the first place, with no<br>
measurable difference of performance or memory usage?  I would<br>recommend to anyone with a large Python 2 code base to simply do a<br>textual search-and-replace and see if any test breaks.  If not,<br>problem solved.<br>
<br></blockquote><div><br></div><div>Couldn't agree more with Armin.</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><br></div>-- <br><div dir="ltr"><div><a href="http://lucasbardella.com" target="_blank">http://lucasbardella.com</a><br>
</div></div>
</div></div>