On Fri, Mar 20, 2009 at 10:20 PM, N. Bruin <[email protected]> wrote:
>
> Thanks Craig,
>
> The '*arg' notation is exactly what I was looking for. My confidence
> in Guido and the sage API designers is restored.
There is also a **kwds's notation, which you should learn about.
If you have a function foo that takes named arguments, e.g.,
def foo(a=5, b=7):
print a+b
you can do
sage: z = {'a':10, 'b'=13}
sage: foo(**z)
23
-- William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---