Skip to content

Feature: less_than, greater_than only supported for numeric types #128

Description

@strangemonad

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions