[Python-ideas] Add sorted (ordered) containers
Neil Girdhar
mistersheik at gmail.com
Thu Oct 13 18:22:04 EDT 2016
Those are great articles. One thing that Andrew does recommend would be to
standardize the interface to the sorted containers, and add them to
collections.abc as SortedDict, and SortedSet.
I recently switched from blist to sortedcontainers and it would be nice to
have these standardized going forward.
Another reason to standardize them is for use with the new type checking.
Best,
Neil
On Thursday, October 13, 2016 at 5:54:09 PM UTC-4, Serhiy Storchaka wrote:
>
> On 13.10.16 23:36, Марк Коренберг wrote:
> > I think it should be one standardized implementation of such containers
> > in CPython.
> >
> > For example, C++ has both ordered_map and unorderd_map.
> >
> > Instead of trees, implementation may use SkipList structure, but this is
> > just implementation details.
> >
> > Such structres imply fast insertion and deletion, ability to iterate,
> > and also memory efficiency.
>
> I recommend to read thorough review articles written by Andrew Barnert:
>
>
> http://stupidpythonideas.blogspot.com/2013/07/sorted-collections-in-stdlib.html
>
> http://stupidpythonideas.blogspot.com/2014/04/sortedcontainers.html
>
>
> _______________________________________________
> Python-ideas mailing list
> Python... at python.org <javascript:>
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161013/c475f59b/attachment.html>
More information about the Python-ideas
mailing list