[Python-Dev] Lambda [was Re: PEP 8 modernisation] (original) (raw)
Chris Angelico rosuav at gmail.com
Thu Aug 1 19:01:39 CEST 2013
- Previous message: [Python-Dev] Lambda [was Re: PEP 8 modernisation]
- Next message: [Python-Dev] Lambda [was Re: PEP 8 modernisation]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Aug 1, 2013 at 5:58 PM, Alexander Shorin <kxepal at gmail.com> wrote:
fun = lambda i: i[1] for key, items in groupby(sorted(items, key=fun), key=fun): print(key, ':', list(items))
I'd do a direct translation to def here:
def fun(i): return i[1] for key, items in groupby(sorted(items, key=fun), key=fun): print(key, ':', list(items))
ChrisA
- Previous message: [Python-Dev] Lambda [was Re: PEP 8 modernisation]
- Next message: [Python-Dev] Lambda [was Re: PEP 8 modernisation]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]