[Chicago] order of keyword arguments

Ian Bicking ianb at colorstudy.com
Thu Feb 5 06:48:59 CET 2009


On Wed, Feb 4, 2009 at 11:33 PM, Igor Sylvester <ias at alum.mit.edu> wrote:

> Is this worthy of a PEP?
>

You could try, but I doubt it'd get any traction.  After all, if you do
func(**kw) there's no possible way to capture the order of the keyword
arguments, since the underlying dictionary didn't have an order.  Also you
have to remember that for:

def add(x, y): return x+y

these function calls are all equivalent:

add(1, 2)
add(1, y=2)
add(y=2, x=1)



-- 
Ian Bicking  |  http://blog.ianbicking.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20090204/c854269c/attachment.htm>


More information about the Chicago mailing list