Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!aioe.org!feeder.news-service.com!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'lambda:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'processing.': 0.13; 'skip:m 30': 0.15; 'command': 0.15; 'bieber': 0.16; 'declaimed': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'lambda': 0.16; 'received:66.245': 0.16; 'received:dsl.mindspring.com': 0.16; 'received:mindspring.com': 0.16; 'received:wlfraed': 0.16; 'sure,': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'wulfraed': 0.16; 'feb': 0.16; 'lee': 0.28; "i'm": 0.28; 'subject:?': 0.29; 'syntax,': 0.30; 'to:addr:python- list': 0.31; '...': 0.31; 'fri,': 0.31; 'url:home': 0.31; 'header:X-Complaints-To:1': 0.32; 'does': 0.33; 'received:org': 0.35; 'but': 0.36; 'charset:us-ascii': 0.37; 'subject:skip:P 10': 0.37; 'effect': 0.38; 'subject:: ': 0.39; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.40; 'dennis': 0.67 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Parameterized functions of no arguments? Date: Thu, 10 Feb 2011 23:22:08 -0800 Organization: > Bestiaria Support Staff < References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: user-11fa6nq.dsl.mindspring.com X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES 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: 19 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1297408937 news.xs4all.nl 81478 [::ffff:82.94.164.166]:37988 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:55728 On Fri, 11 Feb 2011 04:54:11 +0000, Rotwang declaimed the following in gmane.comp.python.general: > menu.add_command(label = str(k), command = lambda: f(k)) > I'm not sure, but what effect does menu.add_command(label=str(k), command = lambda k=k: f(k)) have on the processing. Confusing syntax, I know... does it make more sense as ... lambda x=k: f(x)... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/