Test None for an object that does not implement ==

Devin Jeanpierre jeanpierreda at gmail.com
Mon Dec 26 00:22:38 EST 2011


> Um -- if you don't want a and c being passed in, why put them in the
> function signature?

He wants both or neither to be passed in.

-- Devin

On Sun, Dec 25, 2011 at 11:27 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> GZ wrote:
>>
>> Hi,
>>
>> I run into a weird problem. I have a piece of code that looks like the
>> following:
>>
>> f(...., a=None, c=None):
>>    assert  (a==None)==(c==None)
>
>
>
> Um -- if you don't want a and c being passed in, why put them in the
> function signature?
>
> ~Ethan~
> --
> http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list