<div dir="ltr">I agree with everything you're saying. Another reason to prefer keyword arguments is that they simplify the interface and make it easier to learn.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 3, 2014 at 6:30 PM, Andrew Barnert <span dir="ltr"><<a href="mailto:abarnert@yahoo.com" target="_blank">abarnert@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Feb 3, 2014, at 14:11, Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br>
<br>
> Isn't the only reason that you don't like keyword arguments that take constant values a matter of efficiency?<br>
<br>
</div>I'm pretty sure it's about clarity--letting you write what you mean, and making that meaning explicit at a glance--than performance. (On the rare occasions where performance makes a difference, surely you're already copying the method to a local variable anyway, right?)<br>
<br>
Keyword arguments imply a dynamic choice, different functions a static one, in basically the same way as, say, keyed values vs. attributes. So, if it would be very rare to choose between foo and rfoo dynamically, it makes sense for them to be separate methods; if it's relatively common, it makes sense to have a single method.<br>
<br>
(I'm not sure that it _would_ be rare, but if so, I agree with the rest of the argument against my point.)</blockquote></div><br></div>