On 04Dec2013 09:44, Helmut Jarausch wrote:
> On Wed, 04 Dec 2013 08:13:03 +1100, Cameron Simpson wrote:
> > I iterate over Queues so often that I have a personal class called
> > a QueueIterator which is a wrapper for a Queue or PriorityQueue
> > which is iterable, and an IterablePriorityQueue fac
Helmut Jarausch wrote:
> On Tue, 03 Dec 2013 13:38:58 +0100, Peter Otten wrote:
>
>> Helmut Jarausch wrote:
>>
>>> Hi,
>>>
>>> I'd like to extracted elements from a heapq in a for loop.
>>> I feel my solution below is much too complicated.
>>> How to do it more elegantly?
>>> I know I could use
On Wed, 04 Dec 2013 08:13:03 +1100, Cameron Simpson wrote:
> On 03Dec2013 12:18, Helmut Jarausch wrote:
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>
> I can't believe nobody has mentioned Pri
On Tue, 03 Dec 2013 15:56:11 +0200, Jussi Piitulainen wrote:
> Helmut Jarausch writes:
> ...
>> I know I could use a while loop but I don't like it.
> ...
>> from heapq import heappush, heappop
>> # heappop raises IndexError if heap is empty
> ...
>> # how to avoid / simplify the following functio
On Tue, 03 Dec 2013 13:06:05 +, Duncan Booth wrote:
> Helmut Jarausch wrote:
>
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>> I know I could use a while loop but I don't like it
On Tue, 03 Dec 2013 04:40:26 -0800, rusi wrote:
> On Tuesday, December 3, 2013 5:48:59 PM UTC+5:30, Helmut Jarausch wrote:
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>> I know I could
On Tue, 03 Dec 2013 13:38:58 +0100, Peter Otten wrote:
> Helmut Jarausch wrote:
>
>> Hi,
>>
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>> I know I could use a while loop but I don't like it.
>
On 03Dec2013 14:43, Ian Kelly wrote:
> On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
> > On 03Dec2013 12:18, Helmut Jarausch wrote:
> >> I'd like to extracted elements from a heapq in a for loop.
> >> I feel my solution below is much too complicated.
> >> How to do it more elegantly?
>
On 12/3/13 4:43 PM, Ian Kelly wrote:
On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
On 03Dec2013 12:18, Helmut Jarausch wrote:
I'd like to extracted elements from a heapq in a for loop.
I feel my solution below is much too complicated.
How to do it more elegantly?
I can't believe no
On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
> On 03Dec2013 12:18, Helmut Jarausch wrote:
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>
> I can't believe nobody has mentioned PriorityQ
On 03Dec2013 12:18, Helmut Jarausch wrote:
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
I can't believe nobody has mentioned PriorityQueue.
A PriorityQueue (from the queue module in python 3 and t
Helmut Jarausch writes:
...
> I know I could use a while loop but I don't like it.
...
> from heapq import heappush, heappop
> # heappop raises IndexError if heap is empty
...
> # how to avoid / simplify the following function
>
> def in_sequence(H) :
> try :
> while True :
> N= heappo
Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
>
> Many thanks for some lessons in Python.
>
> Here is my clum
On Tuesday, December 3, 2013 5:48:59 PM UTC+5:30, Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
How about
def in
Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
>
> Many thanks for some lessons in Python.
>
> Here is my clumsy
15 matches
Mail list logo