[Chicago] order of keyword arguments

Ted Pollari tcp at mac.com
Sat Feb 7 06:09:16 CET 2009


On Feb 5, 2009, at 4:20 AM, Igor Sylvester wrote:

> I want to use the foo(A=1,B=2) notation instead of foo(('A', 1),  
> ('B', 2)), where the order of the elements matter.


Again, can you give us a concrete example of this?  Not to be pushy,  
but I'm having trouble seeing where the above is the ideal solution to  
any particular use case that I can think up, so I'm likely missing  
something and would love to be enlightened.  Passing in a list (or  
other sequence) seems to be a much cleaner way of doing this for  
reasons outlined previously.  Because, fundamentally, if you're  
ordering something and that order matters, you're passing in a  
sequence, not a set of discrete keyword arguments.  On some  
philosophical level, I think you're trying to do something that  
conflicts with the notion of 'keyword arguments' -- but maybe that's  
just me.

-ted



More information about the Chicago mailing list