text-extensions-for-pandas icon indicating copy to clipboard operation
text-extensions-for-pandas copied to clipboard

Support __le__ and __ge__ operators for CharSpan, TokenSpan

Open BryanCutler opened this issue 4 years ago • 2 comments

If we don't want to support these, remove these from all_compare_operators test fixture

BryanCutler avatar Aug 20 '20 16:08 BryanCutler

Since we already have __lt__, __gt__, and __eq__ for these types, adding __le__ and __ge__ is both a good idea and easy to do. Adding the "good first issue" tag to this issue. @BryanCutler can you please elaborate on the additional work that needs to be done beyond adding __le__ and __ge__ to the CharSpan and CharSpanArray classes?

frreiss avatar Aug 21 '20 19:08 frreiss

Once implemented, the Pandas base tests can be enabled by removing the below lines from TestPandasComparisonOps._compare_other

        if op_name in ["__le__", "__ge__"]:
            pytest.skip("op not supported")

BryanCutler avatar Aug 21 '20 21:08 BryanCutler