ordered-set icon indicating copy to clipboard operation
ordered-set copied to clipboard

StableSet fork merge

Open idanmiara opened this issue 2 years ago • 1 comments

Closes https://github.com/rspeer/ordered-set/issues/91

  • Major refactor
  • Added a StableSet implementation, as a base class for OrderedSet.
  • Added Many functions to OrderedSet, to be more complete and more compatible with other implementations.
    • popitem(last: bool = True), similar to dict.popitem (note minor incompatibility with another implementation (orderedset) that have the last keyword in the pop function)
    • move_to_end(key), similar to dict.move_to_end
    • le, lt, ge, gt - to improve subset/superset testing
  • Minimum Python version is 3.8 (because reversed)
  • Fix: OrderedSet.update now raised a TypeError instead of a ValueError when the type of the input is incorrect
  • Added many new tests, and all the tests from 2 other implementations.

idanmiara avatar Feb 14 '23 12:02 idanmiara

I can see why these would be desired features, but I don't want to increase the scope of this library. I'd have no ill will if you just released and packaged your own fork.

rspeer avatar Aug 09 '24 19:08 rspeer