Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69292
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <harrismh777@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'read.': 0.03; 'say,': 0.05; 'subject:Python': 0.06; '[1,': 0.09; 'boring': 0.09; 'hacking,': 0.09; 'lawrence': 0.09; 'subject:language': 0.09; 'things,': 0.09; 'playful': 0.16; 'received:10.20.200': 0.16; 'received:charter.net': 0.16; 'reinvent': 0.16; 'subject: \n ': 0.16; 'using,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'subject:list': 0.30; 'code': 0.31; 'another': 0.32; 'programmers': 0.33; 'received:10.20': 0.33; 'subject: (': 0.35; 'subject:lists': 0.35; 'add': 0.35; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'easy': 0.60; 'simple,': 0.60; 'no.': 0.61; "you're": 0.61; 'real': 0.63; 'such': 0.63; 'more': 0.64; 'received:96': 0.65; 'subject:this': 0.83; 'lists:': 0.91 |
| X-Authority-Analysis | v=2.0 cv=F7QP7ddN c=1 sm=1 a=EBsYl1X+Lq2xj3QUCo3MmA==:17 a=zewopLiEtFcA:10 a=FJ9iXZmiczAA:10 a=nDghuxUhq_wA:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=p-33VUW9qRC5gC9F57kA:9 a=QEXdDO2ut3YA:10 a=EBsYl1X+Lq2xj3QUCo3MmA==:117 |
| Date | Fri, 28 Mar 2014 17:23:51 -0500 |
| From | Mark H Harris <harrismh777@gmail.com> |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.python |
| To | python-list@python.org |
| Subject | Re: Howto flaten a list of lists was (Explanation of this Python language feature) |
| References | <lh4r6h$sqr$1@speranza.aioe.org> <mailman.8676.1396044784.18130.python-list@python.org> |
| In-Reply-To | <mailman.8676.1396044784.18130.python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Message-ID | <mailman.8677.1396045443.18130.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1396045444 news.xs4all.nl 2953 [2001:888:2000:d::a6]:41774 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:69292 |
Show key headers only | View raw
On 3/28/14 5:12 PM, Mark Lawrence wrote:
>>
>> No. This has to be a better way to flatten lists:
>>
>> >>> from functools import reduce
>>
>> >>> import operator as λ
>>
>> >>> reduce(λ.add, l)
>> [1, 2, 3, 4, 5, 6, 7, 8, 9]
>>
>
> Why reinvent yet another way of flattening lists, particulary one that
> doesn't use the far more sensible:-
{ particularly }
>
> from operator import add
>
> As for the stupid symbol that you're using, real programmers don't give
> a damn about such things, they prefer writing plain, simple, boring code
> that is easy to read.
:-)) as RMS would say, "playful hacking, dude, playful hacking..."
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Howto flaten a list of lists was (Explanation of this Python language feature) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 16:56 -0500
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-28 22:12 +0000
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:23 -0500
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-29 02:33 +0000
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 22:04 -0500
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Rustom Mody <rustompmody@gmail.com> - 2014-03-28 20:21 -0700
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-29 15:46 +0000
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Chris Angelico <rosuav@gmail.com> - 2014-03-29 14:21 +1100
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 22:39 -0500
Re: Howto flaten a list of lists was (Explanation of this Python language feature) Mark H Harris <harrismh777@gmail.com> - 2014-03-28 17:23 -0500
Re: Howto flaten a list of lists was (Explanation of this Python language feature) mm0fmf <none@mailinator.com> - 2014-03-29 15:59 +0000
csiph-web