Names changed to protect the guilty

Andy Salnikov a_salnikov at yahoo.com
Tue Oct 10 03:04:24 CEST 2006


"Aahz" <aahz at pythoncraft.com> wrote in message 
news:egecss$o1l$1 at panix3.panix.com...
> In article <slrneik8ap.55m.apardon at rcpc42.vub.ac.be>, Antoon Pardon 
> <apardon at forel.vub.ac.be> wrote:
>>
>>The problem is there is also ground for bugs if you don't use "blah is
>>True". If some application naturally seems to ask for a variable that
>>can be valued False, True or a positive integer then things like "if
>>var" or "if not var" may very well be a bug too.
>
> Anyone designing an app like that in Python deserves to lose.  It's just
> another way of shooting yourself in the foot.

OK, I guess nobody ever heard about three-valued logic before, right?

Of course it does not apply to the original post because has_key()
can only return True or False (I hope it will not ever return DontKnow:)
but in general if you implement something like 3-valued logic choices
like (False,True,None) are almost obvious.

  Andy.





More information about the Python-list mailing list