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


Groups > comp.lang.python > #7872

Re: Fun and games with lambda

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'decent': 0.07; 'precision': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lambda': 0.16; 'one-': 0.16; 'seconds': 0.16; 'work,': 0.20; 'header:In-Reply-To:1': 0.21; 'code.': 0.22; 'received:209.85.210.174': 0.23; 'received:mail- iy0-f174.google.com': 0.23; 'wondered': 0.23; 'wonder': 0.23; 'produced': 0.26; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.28; 'sat,': 0.29; 'for,': 0.30; 'steven': 0.32; 'does': 0.33; 'to:addr :python-list': 0.33; 'too': 0.33; 'however,': 0.34; "d'aprano": 0.35; 'idea': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.37; 'run': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'either': 0.39; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'ever': 0.64; 'more...': 0.73; 'quality': 0.74; 'patient,': 0.84
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=yT7hvHfYyrzCFpbxtIlDvWwObYGj7JJdbfGeT/5TQ5g=; b=iOFHnN4xWDXaSicV453zKnz9wapXWoFYxwJcLVUQS+Fbjo5/gCyQqKezU3j8CzWjRN ZhD+UKbijvKdUoQ7oRgbivOYlShEL7Skhx8DuAeC1BGEk88nSrUjbkKIms8KEQ6kLMBf kNlhmnmLqxvCtrIoHaMNSvVap3Xa/FNgs5C8w=
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=LaovY5XKaEEXH6RMh7xHAy2JQXBfz5Nexcz9YOzhRzPCe0DFZhcNK3gfSImo33nsIA IDoWYQVLIokP9zBHxV8qJerUwh4tTowmG6hTN8WArBhRaLk3i3oxiwXIpidBhOe9OSne TyIAf7jGMIQ1XFxfbzeMF4k0WAUB+yPzpzQmQ=
MIME-Version 1.0
In-Reply-To <4dfb7c6d$0$30002$c3e8da3$5496439d@news.astraweb.com>
References <4dfb7c6d$0$30002$c3e8da3$5496439d@news.astraweb.com>
Date Sat, 18 Jun 2011 10:40:37 +1000
Subject Re: Fun and games with lambda
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.99.1308357640.1164.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 82.94.164.166
X-Trace 1308357641 news.xs4all.nl 49041 [::ffff:82.94.164.166]:41413
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7872

Show key headers only | View raw


On Sat, Jun 18, 2011 at 2:10 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> If you've ever wondered what lambda and reduce are good for, run this one-
> liner and wonder no more...
>
> (Be patient, it may take a few seconds to return.)

I have a decent CPU so it's not too bad. And the precision produced is
noteworthy. However, I have no idea how it does its work, so I'm just
in awe of the quality of the code.

And you can read that last remark either way.

ChrisA

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


Thread

Fun and games with lambda Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-17 16:10 +0000
  Re: Fun and games with lambda Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-06-17 18:56 +0200
  Re: Fun and games with lambda Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-17 11:07 -0600
  Re: Fun and games with lambda Mark Dickinson <mdickinson@enthought.com> - 2011-06-17 12:02 -0700
  Re: Fun and games with lambda Chris Angelico <rosuav@gmail.com> - 2011-06-18 10:40 +1000

csiph-web