What is the best queue implemetation in Python?
Duncan Smith
buzzard at urubu.freeserve.co.uk
Thu Feb 22 20:49:53 EST 2007
John wrote:
> I want to write a code for Breadth First Traveral for Graph, which needs a
> queue to implement.
>
> I wonder that for such a powerful language as Python, whether there is a
> better and simpler implementation for a traditional FIFO queue?
>
For a BFS I coded up a while back iterating over a list of nodes (and
appending nodes to the list as dictated by the algorithm) did the job.
Duncan
More information about the Python-list
mailing list