On Wed, Mar 4, 2020 at 4:08 PM David Mertz <mertz@gnosis.cx> wrote:

And I'm also fudging the Decimal question too.  The relationship between *expressions* can vary by decimal context.  But not of a value named by a single variable.

Right: Decimal objects don't know anything about context, and comparisons of Decimal objects don't make use of the context, so if we ignore NaNs, then any set of Decimal objects is totally orderable. So Decimal is totally orderable to exactly the same extent that float is. (Though the behaviour with NaNs is a little more extreme, since comparisons involving sNaNs will raise rather than return False.)

I'd argue that on a practicality-beats-purity basis, it wouldn't be unreasonable to register both `Decimal` and `float` as implementing `TotalOrdering` (or whatever the ABC ends up being called).

-- 
Mark