On Wed, Mar 14, 2012 at 8:27 PM, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Mar 15, 2012 at 10:54 AM, Arnaud Delobelle <arno...@gmail.com> wrote:
>> I don't know this book and there may be a pedagogical reason for the
>> implementation you quote, but pairwise_sum is probably better
>> implemented in Python 3.X as:
>>
>> def pairwise_sum(list1, list2):
>>    return [x1 + x2 for x1, x2 in zip(list1, list2)]
>
> Okay, here's something for debate.
>
> Should the readability of a language be gauged on the basis of its
> standard library, or should you be comparing actual code?

"Actual code" often uses the standard library.

> For instance, a quine in C can be fairly complex and messy, and it can
> be unobvious what it's doing - but in HQ9+ it's easy. Is it fair to
> compare on that basis, or should you actually implement the same /
> equivalent code in each before judging?

It's fair. But it's also fair to note that the comparison is silly,
because the easiness of writing quines doesn't correspond with the
easiness of doing productive things.


-- Devin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to