Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2612

Re: Fun python 3.2 one-liner

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news-transit.tcx.org.uk!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'can.': 0.09; 'commonly': 0.09; 'operator,': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'subject:python': 0.15; 'cracked': 0.16; 'defaults,': 0.16; 'lambda': 0.16; 'okay,': 0.16; 'readable': 0.16; 'shorten': 0.16; 'what?': 0.16; 'code.': 0.18; 'perl': 0.19; 'tue,': 0.20; 'code,': 0.20; 'language': 0.20; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'gregory': 0.23; 'wonder': 0.24; 'chris': 0.27; 'message- id:@mail.gmail.com': 0.28; 'nobody': 0.29; "python's": 0.29; 'ewing': 0.31; 'programmers': 0.31; 'to:addr:python-list': 0.32; 'things': 0.33; 'crazy': 0.35; 'quite': 0.36; 'think': 0.36; 'received:209.85': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'ways': 0.38; 'but': 0.38; 'used': 0.38; 'bus': 0.39; 'explain': 0.39; 'to:addr:python.org': 0.39; 'where': 0.39; 'received:209': 0.39; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'ever': 0.65; 'fellow': 0.65; 'subject:one': 0.73; 'passengers': 0.84; 'received:209.85.210.174': 0.84; 'received :mail-iy0-f174.google.com': 0.84; 'competitions': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=gFovNqRH+KfkMTYzJ/Y5EEAyaP103TymYCkB7qtWEfQ=; b=OtqCN90dJ7/R5FsiGMiOtbpZcuvyBtpPPlPL0oy8bYl8+xW+0/r8FJP5ZLn4eifTu5 dU8B1zwg+x5iSlIQeT0iLiVkRodfQ1HfV+mcJ3B2PZQUFIHVFpdfShOV7sy4H8XqRc+p iZC5Je9nw7KallavwyNAHwXQZXWWghZtin36U=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=wijRbgOJkG4TwuaBRnnfa8e/AZfIZrdZPlEa2JEHGaSDC3CfrB5AAIADDzJBPDELKS o2LxM35sPLl9NU8taiAS2yPqPBgLXtmwJPCHpA/mPJCdgvKLtRnDRVcqOFoxuBE27JyZ uQj/5EeJwzpjBX0tUgAKpm5mW7Ad1fD8P42qQ=
MIME-Version 1.0
In-Reply-To <8vuuagFg70U2@mid.individual.net>
References <df2af546-af99-4e69-bc8e-38c21a045a29@z27g2000prz.googlegroups.com> <o%pkp.365$0s5.220@newsfe17.iad> <86k4f9wzgx.fsf@aiuole.stru.polimi.it> <mailman.20.1301953602.9059.python-list@python.org> <8vuuagFg70U2@mid.individual.net>
Date Tue, 5 Apr 2011 08:45:02 +1000
Subject Re: Fun python 3.2 one-liner
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.25.1301957105.9059.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 82.94.164.166
X-Trace 1301957105 news.xs4all.nl 81473 [::ffff:82.94.164.166]:46316
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2612

Show key headers only | View raw


On Tue, Apr 5, 2011 at 8:16 AM, Gregory Ewing
<greg.ewing@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Fun python 3.2 one-liner harrismh777 <harrismh777@charter.net> - 2011-03-29 14:00 -0500
  Re: Fun python 3.2 one-liner gb <gb@cabiate.it> - 2011-04-04 22:09 +0200
    Re: Fun python 3.2 one-liner Chris Angelico <rosuav@gmail.com> - 2011-04-05 07:46 +1000
      Re: Fun python 3.2 one-liner Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-04-05 10:16 +1200
        Re: Fun python 3.2 one-liner Chris Angelico <rosuav@gmail.com> - 2011-04-05 08:45 +1000
        Re: Fun python 3.2 one-liner Emile van Sebille <emile@fenx.com> - 2011-04-04 15:46 -0700
      Re: Fun python 3.2 one-liner Giacomo Boffi <giacomo.boffi@polimi.it> - 2011-04-05 07:36 +0200

csiph-web