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

Interest in including OrderedSet in python standard library? #89

Open
jagerber48 opened this issue Oct 22, 2022 · 3 comments
Open

Interest in including OrderedSet in python standard library? #89

jagerber48 opened this issue Oct 22, 2022 · 3 comments

Comments

@jagerber48
Copy link

Hello, I am interested to know if the maintainers of this package would have interest in including this functionality in the python standard library. It seems natural for OrderedSet to sit next to OrderedDict in the collections package. There is a discussion on the Python Discussion Forums. It is not clear-cut that it should be added but I wanted to gauge the interest of the folks maintaining the current Python ordered set implementations.

https://discuss.python.org/t/add-orderedset-to-stdlib/12730/15

@rspeer
Copy link
Owner

rspeer commented Oct 24, 2022

I definitely think an OrderedSet belongs in the stdlib.

I think that an OrderedSet that fits naturally in the stdlib would be different from this implementation, which predates the current Python implementation of ordered dicts and ended up doing some things differently. But I'm happy to discuss if you want to use parts of it.

@idanmiara
Copy link

@jagerber48 @rspeer
Related to: #91
We can also discuss my implementation of StableSet which is based on Python 3.6 dict.
I'm not sure if we should propose either implementations, or both.
StableSet could be analogous to dict and OrderedSet could be analogous to OrdredDict
If StableSet is implemented in the stdlib not in pure Python then it would be without dict.values() which would eliminate the extra memory of a pointer per entry set.

@jagerber48
Copy link
Author

@idanmiara I know very little about how some of this code development for python stdlib typically works, I've just been trying to get the communication wheels rolling. I suggest you involve yourself in the discussion here: https://discuss.python.org/t/add-orderedset-to-stdlib/12730/1. A brief summary of my takeaway from the thread is this: People are most interested in an implementation of an OrderedSet based on post 3.6 dict. It sounds like most people wouldn't be opposed to including something like this, but the main concern is answering the question of who would write the implementation and do the work to get it into stdlib and who would do maintenance on it. If you feel like you have opinions on any of those things I recommend you share what you've done in that thread and we go from there!

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

No branches or pull requests

3 participants