Implement ordering on MinKey / MaxKey

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 2.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For any task that involves inspecting chunk ranges with the Python driver, it would be helpful if MinKey and MaxKey would compare always less than / greater than any other value (this is currently not the case, only __eq__ and __ne__ are implemented).

      Implementation suggestion:

      MinKey.__le__ = lambda self, other: True
      MinKey.__lt__ = lambda self, other: other != MinKey()
      MinKey.__gt__ = lambda self, other: False
      MinKey.__ge__ = lambda self, other: other == MinKey()
      

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              Thomas Rueckstiess (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: