Python is readable

Chris Angelico rosuav at gmail.com
Wed Mar 14 20:27:54 EDT 2012


On Thu, Mar 15, 2012 at 10:54 AM, Arnaud Delobelle <arnodel at 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?

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?

Of course, that's all without getting into the question of what does
"readable" even mean. This has nothing to do with the eternal question
of whether it's more readable to use verbose English keywords or
cryptic symbols.

ChrisA



More information about the Python-list mailing list