On Thu, Mar 19, 2020 at 07:28:56PM +0100, Marco Sulla wrote: > On Mon, 16 Mar 2020 at 22:22, Andrew Barnert via Python-ideas > <python-ideas@python.org> wrote: > > I think the best solution is to just not have a SortedList. C++, Java, etc. > > don’t provide anything like that > > Guava has TreeMultiset: > https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/TreeMultiset.html > > The problem is: is there a use case? I mean, how much time you need to > sort a list, add an element and re-sort it?
Depends on whether you are adding and re-sorting *one* element, or if you have to process a hundred million elements, re-sorting after each one. -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/AI6MVJNBAWKQBVAVCYA2ZBAIILFJFZIN/ Code of Conduct: http://python.org/psf/codeofconduct/