Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StableSet fork merge #92

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

StableSet fork merge #92

wants to merge 18 commits into from

Conversation

idanmiara
Copy link

Closes #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.

…atures

- 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
@rspeer
Copy link
Owner

rspeer commented Aug 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge upstream? StableSet: Adding an additional implementation, new features and tests and more.
2 participants