true = 1

Joshua Muskovitz joshm at taconic.net
Sat Jan 12 00:49:56 EST 2002


My guess would be because many things can be true besides the numeral 1.

For example,

Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> true = 1
>>> if true: print "foo"

foo
>>> if ["bar"]: print "foo"

foo
>>> if ["bar"] == true: print "foo"

>>>

sorry-no-spiffy-"ly-yr's"-ly-yr's

-- josh




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list