Optional Parameter Requirements

dhable at gmail.com dhable at gmail.com
Fri Oct 27 15:35:44 EDT 2006


If I'm building a function to accept optional parameters, do I need to
allow for the capture of both the positional arguments as well as the
keyword arguments? If it doesn't make sense to allow keyword arguments,
can I just write:

def myfunc(a, b, *tup):
  ...

and be done with it?

TIA




More information about the Python-list mailing list