[Python-ideas] Sorted lists
Christopher Barker
pythonchb at gmail.com
Fri Apr 12 01:31:00 EDT 2019
I are the appeal, but this really seems too special purpose for yet another
dunder. A SortedList might be a good addition to the statistics package,
however.
I note that with regard to sorting, I suggested a __sort_key dunder so that
the sorting routines could know how to efficiently sort arbitrary objects.
It was pretty soundly rejected as adding too much overhead for a special
case.
This is different, but still a special case.
It’s easy to think that everyone uses the language like you do, but
needling pre-sorted lists is really a pretty special case.
And if performance really matters, you should probably be using numpy
anyway.
-CHB
--
Christopher Barker, PhD
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190411/c21337fa/attachment.html>
More information about the Python-ideas
mailing list