[Baypiggies] a python puzzle

Brent Pedersen bpederse at gmail.com
Wed Apr 14 18:24:54 CEST 2010


On Wed, Apr 14, 2010 at 9:11 AM, Aahz <aahz at pythoncraft.com> wrote:
> On Wed, Apr 14, 2010, Brent Pedersen wrote:
>>
>> 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":
>
> Please describe in more detail what you're trying to do and give
> examples of inputs and expected outputs.
> --
> Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/
>

the inputs and outputs are in the doctest. it's similar to zip, except only
pairs things that have the same key (as defined by groupby). if
there's no pair, return
the list associated with the lower key and None)

> "It is easier to optimize correct code than to correct optimized code."
> --Bill Harlan
> _______________________________________________
> 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