> > > def pop(self): > > > f, node = heapq.heappop() > > > del lookup[node.pos] > > > return node
> > That should be > > > def pop(self): > > > f, node = heapq.heappop(self.heap) > > del self.lookup[node.pos] > > return node > > Hi Peter, > this works great. I will try to find some info about the functionality you > used and to understnad what you did. > Maybe you can add a function to remove a node? > Thanks for your support and all tthe swift answers. > > Robert Just realized what the pop function is for. I changed it from: def pop(self): to def pop(self,pos): and it works. Now I go on with trying to understand it. -- https://mail.python.org/mailman/listinfo/python-list