<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 8, 2019, 6:26 AM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Given all the points already raised, I think that an explicit SortedList might be more appropriate.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">This one looks cool. I've read about it, but haven't used it: <a href="http://www.grantjenks.com/docs/sortedcontainers/">http://www.grantjenks.com/docs/sortedcontainers/</a></div><div dir="auto"><br></div><div dir="auto">I think a "sort hint" should be a read-only attribute of some collections, and statistics should look for the presence of that. You might need to get third parties to follow that convention, but you're no worse than now if they don't. Burdening list with a vague suggestion about an invariant it doesn't maintain is a bad idea.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>