Am Dienstag, 21. Januar 2014 15:19:54 UTC+1 schrieb Peter Otten: > Peter Otten wrote: > > > > > 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 -- https://mail.python.org/mailman/listinfo/python-list