Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'context': 0.07; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; '(it': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; 'value.': 0.19; 'cc:addr:python.org': 0.22; '(or': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'returning': 0.36; 'does': 0.39; 'name': 0.63; 'side': 0.67; 'subject:this': 0.83; 'effects,': 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=gc6QQ83uSwwiT2XSOm2WGeFyNwJGkUHE1HpfIhbxJhA=; b=qhzSMsL3eB1AYDjv5qFu56w6H5ImzBZSTxkBvhbb/J77Gr0u0YCKfkRmygCm4ErZtP g+zYmT1DhpBjzM1COVhrtC3rRYUVipeZLNTG6ECn9LBKkochZRbM4EZhsYRdSfP2xhqv 9hyBkEdV0fDyjJp1FkfIIevPQre6G3pOGaQCg+BLksLIEd/AH90YSvFgLHyGExGSGb6C poUuj43bkocnO2G2f+iUGmtfo4lUdeojYfcKUN+/Oj0yQrHFo8/1mfFvP+NeCN9BPSh8 osTp+lmCJJ6FmxR8Ec6pIVH6v5n1YgBjD1U8yKz67VBRW31DunFfg45+FXD76Fpy3B/Q ugXQ== MIME-Version: 1.0 X-Received: by 10.66.164.229 with SMTP id yt5mr1272720pab.67.1396926157967; Mon, 07 Apr 2014 20:02:37 -0700 (PDT) In-Reply-To: References: <9daf0806-02de-4447-964c-c8f8953c23e5@googlegroups.com> <5334c38e$0$29994$c3e8da3$5496439d@news.astraweb.com> <53364327$0$29994$c3e8da3$5496439d@news.astraweb.com> <53365F55.2040302@gmail.com> <533836c4$0$29994$c3e8da3$5496439d@news.astraweb.com> <533e811a$0$29993$c3e8da3$5496439d@news.astraweb.com> <874n26su9f.fsf@elektro.pacujo.net> <53418644$0$29993$c3e8da3$5496439d@news.astraweb.com> <38795bc9-f67d-423f-a929-212b6b38ec8c@googlegroups.com> Date: Tue, 8 Apr 2014 13:02:37 +1000 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396926161 news.xs4all.nl 2854 [2001:888:2000:d::a6]:45768 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69828 On Tue, Apr 8, 2014 at 11:33 AM, Mark H Harris wrote: > Does a function (or generator) 'do' something (based on name and parms) or > does it 'return' something based on name and parms? If it has no side effects, then it does something, where the 'something' is returning a value. "Return" is a verb. (It can also be a noun, but in the context of functions, it's a verb.) ChrisA