Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; 'explicit': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:language': 0.09; 'python': 0.11; 'language.': 0.14; 'lambda': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'so;': 0.16; 'subject: \n ': 0.16; 'sure.': 0.16; 'why,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'meant': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; '---': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; 'subject:list': 0.30; 'work.': 0.31; '25,': 0.31; 'community': 0.33; 'trouble': 0.34; "i'd": 0.34; 'created': 0.35; 'point.': 0.35; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'right?': 0.36; "i'll": 0.36; 'so,': 0.37; 'clear': 0.37; 'needed': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'expect': 0.39; 'explain': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'free': 0.61; 'viruses': 0.61; 'protection': 0.63; 'our': 0.64; 'worth': 0.66; 'mar': 0.68; 'antivirus': 0.68; 'subject:this': 0.83; 'confusion.': 0.84; 'received:2': 0.84; 'time)': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) Date: Tue, 25 Mar 2014 00:32:01 +0000 References: <9daf0806-02de-4447-964c-c8f8953c23e5@googlegroups.com> <10101874-2995-4acd-9851-989603f052e3@googlegroups.com> <532d5bd9$0$29994$c3e8da3$5496439d@news.astraweb.com> <87ior3w740.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-2-98-198-214.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Antivirus: avast! (VPS 140324-1, 24/03/2014), Outbound message X-Antivirus-Status: Clean 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395707546 news.xs4all.nl 2862 [2001:888:2000:d::a6]:39294 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68922 On 25/03/2014 00:16, Mark H Harris wrote: > On 3/24/14 7:11 PM, Chris Angelico wrote: >> On Tue, Mar 25, 2014 at 10:56 AM, Mark H >> Harris wrote: >>> What is needed is the explicit closure "grab" recommended by ChrisA. >> >> Which does work. You do know why, right? > > Sure. ... but again, that's not the point. The point is NOT can you > explain why it works, the point is that as a lambda construct it is NOT > clear why it works, and because the construct does not match what lambda > users might expect (naturally) there are *constant* questions about it. > > So, again, I'll restate that the community might consider (over time) > whether the confusion created by lambda in python is worth the time and > trouble to maintain the construct in the language. Is the value add > worth the cost of confusion. I don't think so; others are bound to > disagree. > > marcus I'd vote to have lambda taken out of the language if it meant avoiding tedious threads like this one :( -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com