Kwankyu Lee wrote: > Do we have such cases in Python proper? I mean a case that disobeys > (1).
I can't think of any example for base types(*). But this is explicitly allowed by PEP207: | 3 The == and != operators are not assumed to be each other's | complement (e.g. IEEE 754 floating point numbers do not satisfy | this). It is up to the type to implement this if desired. and I guess there are a number of other libraries that use this option. (*) What I said about NaNs earlier in the thread was incorrect: I think the rule is actually that NaN < a, NaN > a, NaN == a are all false for all a (even when a is [the same] NaN), but NaN != a is true for all a. And that's, of course, assuming a particular mapping of the language's comparison operators to IEEE754 comparison predicates, which is the job of the language specification. And hence I don't understand what the remark about IEEE754 in the above quotation refers to. -- Marc -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
