Python 3.0, 'Hello' < 42

towitowi at towitowi at
Wed Jan 28 15:36:06 CET 2009


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

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