Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'assignment': 0.07; 'level,': 0.07; 'variables': 0.07; 'assigning': 0.09; 'mentions': 0.09; 'variables.': 0.09; 'python': 0.11; '"global"': 0.16; 'binding,': 0.16; 'bound,': 0.16; 'declared': 0.16; 'global.)': 0.16; 'statements,': 0.16; 'variable.': 0.16; 'variables,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'module': 0.19; 'seems': 0.21; '(the': 0.22; 'refers': 0.24; 'source': 0.25; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'asked': 0.31; 'code': 0.31; 'block,': 0.31; 'url:python': 0.33; 'there,': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'material': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'clear': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'short': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'is.': 0.60; 'free': 0.61; 'url:3': 0.61; 'name': 0.63; 'refer': 0.63; '30,': 0.65; 'talking': 0.65; 'here': 0.66; 'hand': 0.80; 'dominant': 0.84; 'pardon': 0.84; 'url:reference': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=k6pY4vJcollpuu/47fiGVqHXY2ecwa38ujj+3UfvvuM=; b=HJC+IQTIa6rBPvzjUgGUg+I4LMBGlomP0duqVMa2Cq9JtQzMJltn7viPXsKO8lx7II 6ZG6ij0U41zZtN5l/oMKgxX1F7ru8WXMW3z0V8zzE4Jf/uilh6YkFFfkgojLNxeJyQZY g3gpcm+4GrP5lRlNSdOLyvjiT57REoKd0Nbq0pv97v5Wxf//dbJMjvq5y2u+Sg5DHF11 z2zRpLb68aHO9eUja+AWjH7ETusgvKjE+TIO5ViDSxvqu02cW0MWneRCGBSnTaJxhd5R ju1bWZ1oNrz0NLyFlQCVPc3K3PNsObjVl0sK7rup1V8G0qgU2N4YM+Z+uYK2lF6DNotG M8oA== X-Received: by 10.68.213.5 with SMTP id no5mr20246368pbc.185.1372612441490; Sun, 30 Jun 2013 10:14:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <51D0035A.60004@rece.vub.ac.be> References: <2a2072e3-4b12-4ada-872c-1240d2379928@googlegroups.com> <51CEE8E9.4070703@gmail.com> <51CF1309.1010504@rece.vub.ac.be> <51D0035A.60004@rece.vub.ac.be> From: Ian Kelly Date: Sun, 30 Jun 2013 11:13:20 -0600 Subject: Re: Closures in leu of pointers? To: Python Content-Type: text/plain; charset=ISO-8859-1 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372612451 news.xs4all.nl 15924 [2001:888:2000:d::a6]:48512 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49497 On Sun, Jun 30, 2013 at 4:07 AM, Antoon Pardon wrote: > 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. It seems to refer to "local" and "global" variables as a short hand for talking about specific types of name binding, which is the dominant nomenclature of the documentation. You asked why people talk about Python binding names instead of assigning variables, and I think the reference material is a clear source for that, even if it does also use the word "variable". There is also the section on assignment statements, where it again refers to names being bound, not variables being assigned: http://docs.python.org/3/reference/simple_stmts.html#assignment-statements