Re: PDD 03 Issue: keyword arguments

2004-12-01 Thread Sam Ruby
Sam Ruby wrote: Python provides the ability for any function to be called with either positional or keyword [1] arguments. Here is a particularly brutal example: args={'a':1,'b':2,'c':3} def f(a,b,c): return (a,b,c) def g(b,c,a): return (a,b,c) for j in [f,g]: print j(1,2,3)

Re: PDD 03 Issue: keyword arguments

2004-12-01 Thread Dan Sugalski
At 10:29 PM -0500 11/30/04, Sam Ruby wrote: Python provides the ability for any function to be called with either positional or keyword [1] arguments. Here is a particularly brutal example: Oh, it's even more brutal than that. Perl 6 goes one step further, such that you can't tell whether a

PDD 03 Issue: keyword arguments

2004-11-30 Thread Sam Ruby
Python provides the ability for any function to be called with either positional or keyword [1] arguments. Here is a particularly brutal example: args={'a':1,'b':2,'c':3} def f(a,b,c): return (a,b,c) def g(b,c,a): return (a,b,c) for j in [f,g]: print j(1,2,3) for j in [f,g]: