You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was surprising to me that is_less_than etc were part of the numeric mix-ins and not part of a more general ordering mix-ins. Many types can be ordered with some combination of __lt__, __gt_, etc magic methods plus functools.total_ordering. I would even suggest that checking that the types of the left-hand and right-hand sides be left up to the the magic method implementation (e.g. a custom _lt_ implementation can check that other matches a supported type or dynamically lookup other's fields).