But beware, IIRC there are pathological cases involving floats, (long) ints and rounding where transitivity may be violated in Python (though I believe only Tim Peters can produce an example :-).
Not anymore ;-) That is, while comparisons mixing bigints and floats may have suffered rounding surprises long ago, all cases of float-or-int compared-to float-or-int now act as if infinite precision were used. You can throw fractions.Fraction and (I believe) decimal.Decimal into that too. Except for NaNs in the floating types, there's a well-behaved total ordering now (whether doing mixed-type or intra-type comparisons).
That doesn't make it surprise-free, though. For example, just last week someone on bugs.python.org flipped out ;-) upon learning
10**100 == 1e100
10**100 < 1e100
Because, indeed, they don't denote the same "mathematical" value: