Re: returning True, False or None

2005-02-04 Thread Fahri Basegmez
"Mick Krippendorf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Fahri Basegmez wrote: >> reduce(lambda x, y: x or y, lst) > > This doesn't solve the OPs problem since > > >>> reduce(lambda x, y: x or y, [False, None]) > >

Re: returning True, False or None

2005-02-04 Thread Fahri Basegmez
"Michael Spencer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Fahri Basegmez wrote: >> reduce(lambda x, y: x or y, lst) >> >> works but when I tried >> >> import operator >> reduce(operator.or_, lst) >> >>

Re: returning True, False or None

2005-02-04 Thread Fahri Basegmez
reduce(lambda x, y: x or y, lst) works but when I tried import operator reduce(operator.or_, lst) this did not work. It pukes Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported operand type(s) for |: 'NoneType' and 'bool' Any comments? Fahri -- http://mail.p