I am working in python and I have some problem with heapq. When I push an element into the heap I receive this error :
TypeError: '<' not supported between instances of 'Point' and 'Point'
Point is my internal class. I push a tuple formed by (float,Point), in according with documentation, heapq should use float as a key, but it doesn't. To be more precise sometimes use float but not always. What is the problem?