ordered-set
ordered-set copied to clipboard
StableSet fork merge
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 thelast
keyword in thepop
function) - move_to_end(key), similar to
dict.move_to_end
- le, lt, ge, gt - to improve subset/superset testing
- popitem(last: bool = True), similar to
- 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.
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.