What values are considered false?
Roy Smith
roy at panix.com
Wed Feb 20 23:11:08 EST 2002
Erik Max Francis <max at alcyone.com> wrote:
> Many languages (other than Scheme) have a loose definition of truth
> and falsity, simply because at times it's useful to be able to test
> any object for truth.
If you want a really odd concept of falsity, look at SQL. NULL is neither
true nor false! Or, looking at it a different way, anything non-NULL is
neither equal to, nor not equal to NULL.
This actually causes some strange interactions in the python SQL modules.
You put '' into a database, and get None back. They are both false, but
they're not the same thing.
Anybody remember .TRUE. and .FALSE. :-)
PS -- In the lists of false things in python that have been mentioned on
this thread, I don't think I've seen anybody mention {}, the empty
dictionary.
More information about the Python-list
mailing list