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)
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
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]: