Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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; 'operator': 0.03; 'subject:skip:c 10': 0.07; '"run': 0.09; 'called.': 0.09; 'received:mail-vc0-f174.google.com': 0.09; 'distinction': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'time"': 0.16; 'wrote:': 0.17; 'defined': 0.22; "i'd": 0.22; '15,': 0.23; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; '(which': 0.26; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'subject:list': 0.28; 'run': 0.28; "d'aprano": 0.29; 'received:209.85.220.174': 0.29; 'steven': 0.29; 'function': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'time,': 0.62; 'between': 0.63; 'necessarily': 0.63; 'jul': 0.65; 'treat': 0.65; 'subject:funny': 0.91; 'time)': 0.91 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:to :content-type; bh=EvWXcp76TKeCWaV5nMrk9S/TG0KJTVzDuoRN4EpnVI0=; b=dIY/hZivTA8OY2sPlzV1tQkqFlcq80V5psrymgenotae1MlewPJliTno5IA48VlmAw naRwNM/CXG4ztLROtFCFhRBsMn6yQb6tLrr2dMGK3dUt/G8EZwL5Gn3Zbx/uEbaivF70 6Miy4PTPGrOGSJCN5cC3dMgGydowNYS7KWQF6grbrL3Jj+y3izRdZvNZdhxqwQbY1MdB /fYBO6qmRhv5oM958nA5bPF+J0Uk9RDaodxS6E9LLTB7jWBQ9PkU7RhiJJoVA8fPxKvw 3xJ8qGg2B8pgolbs9AOOeZxdhXkR1hKk/9DKvqJBz9MQ18o1nO1x3q54dEuariesWMAS r6yw== MIME-Version: 1.0 In-Reply-To: <500200be$0$29995$c3e8da3$5496439d@news.astraweb.com> References: <03943ea6-5914-4de4-821c-055bed1d5804@f9g2000pbd.googlegroups.com> <4fffc1fd$0$29965$c3e8da3$5496439d@news.astraweb.com> <5000608c$0$6930$e4fe514c@news2.news.xs4all.nl> <500200be$0$29995$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 15 Jul 2012 10:49:48 +1000 Subject: Re: lambda in list comprehension acting funny From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 1342313391 news.xs4all.nl 6868 [2001:888:2000:d::a6]:50973 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25326 On Sun, Jul 15, 2012 at 9:29 AM, Steven D'Aprano wrote: > Not necessarily *compile* time, but the distinction is between when the > function is defined (which may at compile time, or it may be at run time) > versus when the function is called. I'd treat the def/lambda statement as "compile time" and the () operator as "run time". ChrisA