true = 1

Mark McEahern marklists at mceahern.com
Sat Jan 12 11:50:34 EST 2002


Joshua Muskovitz wrote:
> My guess would be because many things can be true besides the numeral 1.
>
> For example,
> >>> true = 1
> >>> if ["bar"]: print "foo"
>
> foo
> >>> if ["bar"] == true: print "foo"
>
> >>>

In other words, my proposal does not imply using the second method of
evaluating true nor does it preclude it.

// mark





More information about the Python-list mailing list