free and nonlocal variables

2013-03-21 Thread bartolome . sintes
In Python 3, free variable and nonlocal variable are synonym terms? 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? Thanking you in advance, Bartolomé Sintes --

Re: free and nonlocal variables

2013-03-21 Thread 88888 Dihedral
bartolom...@gmail.com於 2013年3月21日星期四UTC+8下午4時52分17秒寫道: In Python 3, free variable and nonlocal variable are synonym terms? 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?

Re: free and nonlocal variables

2013-03-21 Thread Steven D'Aprano
On Thu, 21 Mar 2013 01:52:17 -0700, bartolome.sintes wrote: In Python 3, free variable and nonlocal variable are synonym terms? 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?

Re: free and nonlocal variables

2013-03-21 Thread Terry Reedy
On 3/21/2013 4:52 AM, bartolome.sin...@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

Re: free and nonlocal variables

2013-03-21 Thread Nobody
On Thu, 21 Mar 2013 01:52:17 -0700, bartolome.sintes wrote: In Python 3, free variable and nonlocal variable are synonym terms? Free variable is a computer science term. A variable is free if it is not bound. E.g. x and y are free in x+y, x is bound and y is free in lambda x: x+y, x and y are

Re: free and nonlocal variables

2013-03-21 Thread Jussi Piitulainen
Nobody writes: On Thu, 21 Mar 2013 01:52:17 -0700, bartolome.sintes wrote: In Python 3, free variable and nonlocal variable are synonym terms? Free variable is a computer science term. A variable is free if it is not bound. E.g. x and y are free in x+y, x is bound and y is free in