"0 in [True,False]" returns True

Antoon Pardon apardon at forel.vub.ac.be
Wed Dec 14 10:07:03 EST 2005


Op 2005-12-14, Grant Edwards schreef <grante at visi.com>:
> On 2005-12-14, bonono at gmail.com <bonono at gmail.com> wrote:
>
>>> Well, as you might argue, I'm not tryng to effect a change in your
>>> behaviour, I'm simply trying to point out how it could be made more
>>> rational.
>>
>> What would be the difference in his usage and allowing Null in a RDBMS
>> column?
>
> Don't know -- homey don't play 'dat.
>
>> Or return NaN instead of raising exception for numeric
>> functions ?
>
> Because usually (in my applications anyway) NaN is a perfectly
> valid value and not an "exception" case that needs to be handled.

I don't see the difference. In my application False and True
(or Registered and UnRegistered if you prefer) are perfectly valid
values too.  They are not "exception" cases that need to be
handled.

-- 
Antoon Pardon



More information about the Python-list mailing list