| 1 | initial version |
To do optional arguments in Python (and hence, Sage), the idiom is something like
def f(a=2,b=3,*args):
<function definition>
first_optional_argument = args[0]
<etc>
where args then becomes a list of the optional arguments. See much more detailed stuff:
*args)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.