What is the best queue implemetation in Python?

John Machin sjmachin at lexicon.net
Thu Feb 22 19:36:50 EST 2007


On Feb 23, 11:24 am, "John" <rds1... at sh163.net> wrote:
> Than C or PASCAL
> I mean, list or dictionary in Python are so powerful than the traditional
> array. Maybe I can make use of it?

Well, you could wite your own queue manager using Python lists,
but ...

You have this strange reluctance to look in the documentation. Have
you tried Google? Try http://docs.python.org/lib/deque-objects.html

Or perhaps you want/need the Queue module or the heapq module.

*You* find them and *you* work out what is best for *your* needs.

If you have a question that you could not answer yourself, then ask it
here.

HTH,
John





>
> "John Machin" <sjmac... at lexicon.net> wrote in message
>
> news:1172190018.915043.200560 at v45g2000cwv.googlegroups.com...
>
> > On Feb 23, 11:12 am, "John" <rds1... at sh163.net> 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?
>
> > Better and simpler than *WHAT*?





More information about the Python-list mailing list