OrderedSet implementations: - https://github.com/methane/cpython/pull/23/files - https://pypi.org/search/?q=orderedset - https://pypi.org/project/orderedset/ - https://code.activestate.com/recipes/576694/ - https://pypi.org/project/ordered-set/ - https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/base.py... (pandas' Index types) - https://pypi.org/project/sortedcollections/ [Ordered] Sets and some applications: - https://en.wikipedia.org/wiki/Set_(mathematics) - https://en.wikipedia.org/wiki/Set_notation - https://en.wikipedia.org/wiki/Set-builder_notation - https://en.wikipedia.org/wiki/Glossary_of_set_theory - https://en.wikipedia.org/wiki/Set_(abstract_data_type) - Comparators - https://en.wikipedia.org/wiki/Total_order - https://en.wikipedia.org/wiki/Partially_ordered_set - https://en.wikipedia.org/wiki/Causal_sets On Thu, Dec 19, 2019 at 12:05 PM Tim Peters <tim.peters@gmail.com> wrote:
[Nick Coghlan <ncoghlan@gmail.com>]
Starting with "collections.OrderedSet" seems like a reasonable idea, though - that way "like a built-in set, but insertion order preserving" will have an obvious and readily available answer, and it should also make performance comparisons easier.
Ya, I suggested starting with collections.OrderedSet earlier, but gave up on it.
The problem is that the "use case" here isn't really a matter of functionality, but of consistency: "it would be nice if", like dicts enjoy now, the iteration order of sets was defined in an implementation-independent way. That itch isn't scratched unless the builtin set type defines it. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PM5ENMLR... Code of Conduct: http://python.org/psf/codeofconduct/