diff --git a/pytools/graph.py b/pytools/graph.py index 346442222e103966a6608e701c9aacc1643f73ab..a00fe3178c58d23deecb40bdcd00404a7cf25b22 100644 --- a/pytools/graph.py +++ b/pytools/graph.py @@ -180,6 +180,13 @@ class CycleError(Exception): class HeapEntry: + """ + Helper class to compare associated keys while comparing the elements in + heap operations. + + Only needs to define :func:`pytools.graph.__lt__` according to + <https://github.com/python/cpython/blob/8d21aa21f2cbc6d50aab3f420bb23be1d081dac4/Lib/heapq.py#L135-L138>. + """ def __init__(self, node, key): self.node = node self.key = key