3 ms·
A list is called a list in python for the same reason the term dictionary is used -- these are the high level concepts for abstract types. The specific implemen
by axiak 13y ago
A list is called a list in python for the same reason the term dictionary is used -- these are the high level concepts for abstract types. The specific implementation details aren't too important, as often times you just want "the fastest in general" which python does fairly well given the constraints.
As an example, a dictionary is implemented by a hash map, but after investigation, CPython may very well decide that any dictionary smaller than N is implemented as a constant table lookup. It wouldn't be renamed to TableLookupToHashMap. That would be silly.