Why are there no sorted containers in Python's standard libraries?

后端 未结 6 1025
执念已碎
执念已碎 2020-12-02 18:06

Is there a Python design decision (PEP) that precludes a sorted container from being added to Python?

(OrderedDict is not a sorted container since it is

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 18:45

    There is a heapq in the standard library, it is not exactly sorted, but kind of. There is also a blist package, but it is not in the standard library.

提交回复
热议问题