Incomparable abominations (was: python-dev Summary)
Dan Bishop
danb_83 at yahoo.com
Sun Mar 23 03:46:06 EST 2003
"Donn Cave" <donn at drizzle.com> wrote in message news:<1048379933.586672 at yasure>...
> What about
>
> 1 == "2"
>
> should it also be cause for an exception?
Imho, no. It should simply have a value of False.
> Sorry if I missed the
> earlier posts in this thread that would explain how == differs from
> < in this application.
Because it makes intuitive sense that x != y when x and y have
completely different types. The same cannot be said about "3" < 1.
More information about the Python-list
mailing list