Heapq is a priority queue implemented on a binary tree; not a btree.
> I dont say it's not a good DS, but having it in all languages stdlib seems overkill given the tool we have today.
C++ has map and Java has TreeMap. These are both red black trees (which are equivalent to btrees where k=4). So there's no question of whether there are ordered mapping types in these languages. IMO they'd be better as b(+)rees with a wider fanout. That's all.
Technically you would be using a btree, but a higher level interface, like with a fs or hashmap. Which is kinda my point.
I dont say it's not a good DS, but having it in all languages stdlib seems overkill given the tool we have today.
I'm a python guy, and even without panda it has the heapq module which is a b-tree, yet I never really got a reason to use it.