New submission from Марк Коренберг: I mean mutable containers that are always sorted when iterating over them. i.e.
* SortedSet (sorted unique elements, implemented using (rb?)tree instead of hash) * SortedList (sorted elements, the same as SortedSet, but without uniquiness constraint) - actually a (rb?)tree, not a list (i.e. not an array) * SortedDict (sorted by key when interating) - like C++'s ordered_map There are many implementations in the net, like: https://bitbucket.org/bcsaller/rbtree/ http://newcenturycomputers.net/projects/rbtree.html https://sourceforge.net/projects/pyavl/ http://www.grantjenks.com/docs/sortedcontainers/ and also in pip: pip3 search sorted | grep -Ei '[^a-z]sorted' I think it should be one standardized implementation of such containers in CPython. For example, C++ has both ordered_map and unorderd_map. P.S. Did not found if such issue was raised earlier. ---------- components: Library (Lib) messages: 278586 nosy: mmarkk priority: normal severity: normal status: open title: Add sorted (ordered) containers type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28433> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com