Re: What is the best queue implemetation in Python?

2007-02-23 Thread sunheaver
On Feb 22, 12:40 pm, hg <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > On Feb 23, 11:12 am, "John" <[EMAIL PROTECTED]> 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, wh

Re: What is the best queue implemetation in Python?

2007-02-23 Thread Szabolcs Nagy
> 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. you mean *much* faster (since a list is a reference array so pop(0) is O(n) operation) never use a list a

Re: What is the best queue implemetation in Python?

2007-02-22 Thread bearophileHUGS
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, b

Re: What is the best queue implemetation in Python?

2007-02-22 Thread James Stroud
John Machin wrote: > On Feb 23, 11:24 am, "John" <[EMAIL PROTECTED]> 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 ... > > Y

Re: What is the best queue implemetation in Python?

2007-02-22 Thread Duncan Smith
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 iterat

Re: What is the best queue implemetation in Python?

2007-02-22 Thread hg
hg wrote: > f u "f o" of course -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best queue implemetation in Python?

2007-02-22 Thread hg
John Machin wrote: > On Feb 23, 11:12 am, "John" <[EMAIL PROTECTED]> 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

Re: What is the best queue implemetation in Python?

2007-02-22 Thread John Machin
On Feb 23, 11:24 am, "John" <[EMAIL PROTECTED]> 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 lo

Re: What is the best queue implemetation in Python?

2007-02-22 Thread John
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? "John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Feb 23, 11:12 am, "John" <[EMAIL PROTECTED]> wrote: > > I want to write a code for Breadth F

Re: What is the best queue implemetation in Python?

2007-02-22 Thread John Machin
On Feb 23, 11:12 am, "John" <[EMAIL PROTECTED]> 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? >

What is the best queue implemetation in Python?

2007-02-22 Thread John
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? Thanks! -- http://mail.python.org/mailman/listinfo/python-lis