What is the best queue implemetation in Python?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Feb 23 01:34:59 EST 2007


John:
> I want to write a code for Breadth First Traveral for Graph, which needs a
> queue to implement.

For that purpose I have used the good deque that you can find in
collections in the standard library. It's very good for queues, and
it's a bit faster than regular lists for stacks too.

Bye,
bearophile




More information about the Python-list mailing list