Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; 'explicit': 0.07; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: \n ': 0.16; 'why,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; 'work.': 0.31; '25,': 0.31; 'received:google.com': 0.35; 'right?': 0.36; 'needed': 0.38; 'does': 0.39; 'mar': 0.68; 'subject:this': 0.83; '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=OiIPthTWq5BzO3UryTJfsOR2wTt+TjOz+PY5IQP6x4A=; b=K2SNIBWEXNbQLrZhZ+KSMlwmuBW+PajS5OUVoAqRtsBrNCZL1LBk2sFBZSgkr+igYi xralXEgV7DYNkGX9SwbhlOrdPuDik7/rcRI9KuIypXV2mNMfE2/YuLbWH3lxYPr3FPfw 7NsC6hTqyGShSp1hgKbQYVSb7UZ3qS5vWFTd5qKp3WCdSXfIh80e9EctB1Di3D6kAi1V nGQ0s3UuJKKGNYZ4VsNtjY1kjeTk59oe3ghca16tmdzz5OsIrblntx7ml6iAPdDo0Il9 1IrzAuIpOVnLBOwDvcXd8YtUvh7KFRJaEHHiXkaiHvAZcXap1eR+qhG0JafJNAC1BYCd YB5A== MIME-Version: 1.0 X-Received: by 10.68.197.36 with SMTP id ir4mr73677860pbc.46.1395706284693; Mon, 24 Mar 2014 17:11:24 -0700 (PDT) In-Reply-To: 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> Date: Tue, 25 Mar 2014 11:11:24 +1100 Subject: Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list) From: Chris Angelico Cc: "python-list@python.org" 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: 6 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395706293 news.xs4all.nl 2830 [2001:888:2000:d::a6]:54903 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68918 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? ChrisA