Path: csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'differently': 0.07; 'level,': 0.07; 'variables': 0.07; 'mentions': 0.09; 'variables.': 0.09; 'python': 0.11; 'behave': 0.16; 'bind': 0.16; 'declared': 0.16; 'global.)': 0.16; 'lisp': 0.16; 'objects.': 0.16; 'received:192.168.1.4': 0.16; 'variable.': 0.16; 'sat,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'module': 0.19; '(the': 0.22; '>>>': 0.22; 'saying': 0.22; 'header:User- Agent:1': 0.23; "haven't": 0.24; 'defined': 0.27; 'header:In- Reply-To:1': 0.27; 'michael': 0.29; 'am,': 0.29; 'work.': 0.31; 'code': 0.31; 'block,': 0.31; 'anyone': 0.31; 'this.': 0.32; 'url:python': 0.33; 'there,': 0.34; 'problem': 0.35; 'but': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'list': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'ian': 0.60; 'is.': 0.60; 'free': 0.61; 'url:3': 0.61; 'name': 0.63; 'real': 0.63; 'here': 0.66; 'fact,': 0.69; 'pardon': 0.84; 'received:195.238': 0.84; 'received:195.238.6': 0.84; 'received:belgacom.be': 0.84; 'received:isp.belgacom.be': 0.84; 'url:reference': 0.84; '2013': 0.98 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcDAAQB0FFbtrYE/2dsb2JhbAANTYM7v1kDAYETgxcBAQEBAzhRCxgJJQ8CRhMGAgKIF6khiTiIB45/ZhaDUQOXSIEpky8 Date: Sun, 30 Jun 2013 12:07:22 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Closures in leu of pointers? References: <2a2072e3-4b12-4ada-872c-1240d2379928@googlegroups.com> <51CEE8E9.4070703@gmail.com> <51CF1309.1010504@rece.vub.ac.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372586850 news.xs4all.nl 15970 [2001:888:2000:d::a6]:42402 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49483 Op 29-06-13 21:23, Ian Kelly schreef: > On Sat, Jun 29, 2013 at 11:02 AM, Antoon Pardon > wrote: >> Op 29-06-13 16:02, Michael Torrie schreef: >> >>> >>> The real problem here is that you don't understand how python variables >>> work. And in fact, python does not have variables. It has names that >>> bind to objects. >> >> >> I don't understand why members of this list keep saying this. Sure the >> variables in python behave differently than those in C and algol But they >> behave similarly as those in smalltalk and lisp and I haven't seen >> anyone claim that smalltalk and lisp don't have variables. > > Perhaps because that is the terminology used by the language documentation: > > http://docs.python.org/3/reference/executionmodel.html#naming-and-binding I don't think this reference is as strong as you think it is. Here is a paragraph somewhat lower: ] If a name is bound in a block, it is a local variable of that block, ] unless declared as nonlocal. If a name is bound at the module level, ] it is a global variable. (The variables of the module code block are ] local and global.) If a variable is used in a code block but not ] defined there, it is a free variable. So the language documentation mentions these names as being variables. -- Antoon Pardon