On Sun, Jul 13, 2008 at 9:05 PM, bob gailer <[EMAIL PROTECTED]> wrote: > As an alternative to Kent's suggestion consider: > > def foo(parameter, *args) > > args will be a tuple with 0, 1 or more items in it. > > So you can test for len(args) == 1
Presumably the OP wants to distinguish between op1 and op2, so my guess is that def foo(parameter, **kwargs) would be more appropriate. (kwargs will be a dict containing any keyword parameters.) Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
