[Baypiggies] a python puzzle

Tung Wai Yip tungwaiyip at yahoo.com
Wed Apr 14 17:56:15 CEST 2010

What problem have you encountered with heapq.merge?

Wai Yip

> hi, in trying to write a func that does a kind of merging of 2 sorted  
> lists,
> i've come up with a fairly simple implementation that "almost works":
> http://gist.github.com/365485
> but it hits StopIteration before returning the last value ([9], None)
> i can wrap the whole thing in a bunch more if statements, i've tried
> heapq.merge, but cant find a nice solution.
> any ideas? i think it's an interesting problem.
> -brent
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies

More information about the Baypiggies mailing list