Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41645

Re: free and nonlocal variables

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'variable,': 0.07; 'python': 0.09; 'definition,': 0.09; 'difference,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.17; 'variables': 0.17; 'jan': 0.18; 'variable': 0.20; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'am,': 0.27; 'header:X-Complaints-To:1': 0.28; 'to:addr:python-list': 0.33; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'usual': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'free': 0.61; 'email addr:gmail.com': 0.63; 'believe': 0.69; 'received:fios.verizon.net': 0.84; 'subject:free': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: free and nonlocal variables
Date Thu, 21 Mar 2013 07:55:01 -0400
References <263e910f-4cc5-4b50-bf8d-c207622170b5@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
In-Reply-To <263e910f-4cc5-4b50-bf8d-c207622170b5@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3584.1363866922.2939.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1363866922 news.xs4all.nl 6889 [2001:888:2000:d::a6]:41702
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41645

Show key headers only | View raw


On 3/21/2013 4:52 AM, bartolome.sintes@gmail.com wrote:
> In Python 3, "free variable" and "nonlocal variable" are synonym terms?

Yes, but that is idiosyncratic to Python.

> Or is there a difference, like "a free variable is a variable that is
> not a local variable, then nonlocal variables and global variables are
 > both free variables"?

I believe that is the usual definition, such as you would find on Wikipedia.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

free and nonlocal variables bartolome.sintes@gmail.com - 2013-03-21 01:52 -0700
  Re: free and nonlocal variables 88888 Dihedral <dihedral88888@googlemail.com> - 2013-03-21 02:34 -0700
  Re: free and nonlocal variables Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-21 11:00 +0000
  Re: free and nonlocal variables Terry Reedy <tjreedy@udel.edu> - 2013-03-21 07:55 -0400
  Re: free and nonlocal variables Nobody <nobody@nowhere.com> - 2013-03-21 19:05 +0000
    Re: free and nonlocal variables Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-03-21 22:36 +0200

csiph-web