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
James wrote:
Hi All,
I'm writing a function that has optional paramters (i.e., "foo(
parameter , optionalParameter = None , optionalParameter2 = None )").
Is there some way inside of foo() that I can check to see how many
parameters have been passed in? I want to check to ensure that only
*one*
On Sun, Jul 13, 2008 at 7:27 PM, James <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm writing a function that has optional paramters (i.e., "foo(
> parameter , optionalParameter = None , optionalParameter2 = None )").
>
> Is there some way inside of foo() that I can check to see how many
> parameters
Hi All,
I'm writing a function that has optional paramters (i.e., "foo(
parameter , optionalParameter = None , optionalParameter2 = None )").
Is there some way inside of foo() that I can check to see how many
parameters have been passed in? I want to check to ensure that only
*one* optional param