![]() |
| You sometimes need a bit more convenience than a barrel to store your water. |
Recently, I wrote about heaps in Python and promised a sequel. Here, you are. This time, we ponder over the shortcomings of Python's heap module, heapq.
So, what's wrong with it? Nothing at all if you have the basic needs: fast push and pop onto a heap. However, as usual, at a certain point, you want more features in your program which in turn set the requirements higher for the heap implementation you use. If that happens, you usually
