Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'dan': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'choice,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lambda': 0.16; 'subject:show': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'says': 0.33; 'fri,': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'subject:data': 0.36; 'subject:?': 0.36; 'list': 0.37; 'filter': 0.38; 'does': 0.39; 'map': 0.64; 'bare': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=kRVuUDN4V9+3Jscddmx81jzvRoN/REun8dQ8gPqBc/A=; b=tpXtgvy1MYGKjG4lvmAC3zIkmT8I6Z5EQhti7uz3Sso3vm26wAOWBz2GQVO9VIAfgp LPe0m7TGCSKB4GPCuFUWTFZ6xmCobdEJbIVaf0ygY2j7V1d3X667R0nwwypxVEgTROKg R+HmaqEmFHuXJI+poaVMymc022VBXTnoruMaDSyjErMb0kMHPDUsyTV4NjZqiplj2rs0 YTeiXOUMKF+iEyMVCMke9f9urRF3qPgeA3JpLgsCsQ1KfLwh0PYWhIW7gxmBidpVm62u gZcH194gZlInNnClWn9AOPOayAY76xTEuGd2v6iM85kqjsWlsz14F+5ezsAarTKGEmX8 Ig4g== MIME-Version: 1.0 X-Received: by 10.42.92.129 with SMTP id t1mr7907253icm.59.1412283708745; Thu, 02 Oct 2014 14:01:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Oct 2014 07:01:48 +1000 Subject: Re: How to show a dictionary sorted on a value within its data? From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412283716 news.xs4all.nl 2864 [2001:888:2000:d::a6]:49141 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78627 On Fri, Oct 3, 2014 at 6:06 AM, Dan Stromberg wrote: > Anyway, pylint doesn't complain about a bare use of lambda, but it > does complain about a map applied to a lambda or a filter applied to a > lambda. Pylint says they could be replaced by a list comprehension, > with the warning "deprecated-lambda". That's not because lambda is a poor choice, but because map() in Py2 code can often be replaced with a list comp. (And map() in Py3 code can often be replaced by a genexp.) ChrisA