Python 3.0, 'Hello' < 42

towitowi at gmail.com towitowi at gmail.com
Wed Jan 28 09:36:06 EST 2009


Hello,

In the 3.0 changes list there is mentioned that "<"-compares are not
supported anymore if the compared types are different (except
numbers). Like
  42 < "Hello"
did return True of False depending on the implementation but is now a
TypeError.

But the document also mentions that the result is not strictly
"undefined" but "reproducable undetermined". Meaning, that on a given
machine with a given python implementation result will always be the
same. But on another machine, or with another python implementation,
it might give a different result.

My question now is, why this is? E.g, Is there an integer large enough
so that the result changes? What circumstances influence the result?

Thanks in advance.

tschau, towi.



More information about the Python-list mailing list