On Sun, Mar 15, 2020 at 1:20 PM Chris Angelico <ros...@gmail.com> wrote:

> Recommendation: If anything is added to the standard library, it
> should be named according to its use-cases, not its implementation.
>

Agreed. Which is why I named my toy SortedMap :-)

However, what if we made another, e.g. Mapping, with the only difference
being different performance characteristics? Not sure what the appropriate
name would be.

-CHB

Python has a "dictionary", not a "hashtable". You might think *today*
> that a binary tree is the only way you'd ever want this to be
> implemented, but in twenty years' time, maybe there'll be a different
> data structure with equivalent semantics and better performance.
>
> Don't do what SourceMod did, and bake the name "trie" into its API...
>
> https://sm.alliedmods.net/new-api/adt_trie/CreateTrie
> > The word "Trie" in this API is historical. As of SourceMod 1.6, tries
> have been
> > internally replaced with hash tables, which have O(1) insertion time
> instead of O(n).
>
> :)
>
> ChrisA
> _______________________________________________
> 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/6UA2KVSIE7J67PAQIPZEG4MULEYUPUMR/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
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/NMTVFNTK53OSQAQTLXANSHSMWEBO6QRO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to