Fun python 3.2 one-liner

Chris Angelico rosuav at gmail.com
Tue Apr 5 00:45:02 CEST 2011


On Tue, Apr 5, 2011 at 8:16 AM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>
> Crazy thought: I wonder if Perl programmers have "multi
> line Perl" competitions where they laugh their heads off
> at how readable the code is, and how nobody in their
> right mind would ever write Perl code that way?-)

Ha!! Okay, now I have to explain to my fellow bus passengers what it
is that I just cracked up laughing at...

You know what? I don't think I can.

I do like readable code, but quite a few of my favorite language
features are the ones commonly (ab)used to make unreadable code. C's
?: operator, Pike's interpretation of || for defaults, Python's lambda
functions... all great ways to shorten your code, but so easily used
for evil.

I think I like things that can be used for evil.

ChrisA



More information about the Python-list mailing list