Binding frustration
Terry Reedy
tjreedy at udel.edu
Fri Sep 19 12:27:10 EDT 2003
"Ulrich Petri" <ulope at gmx.de> wrote in message
news:bkesft$105nn$1 at ID-67890.news.uni-berlin.de...
> Whenever you use the assignment syntax (foo = bar) you create a
"new"
> binding unless you have declared the name global.
Name assignment (name = expr) always creates a new binding (and
deletes any previous binding of the same name). The 'global'
declaration only affects which namespace the binding is made in. I
believe that any sense in which foo=bar would not make a 'new' binding
would be equally applicable to local as well as global binding.
Terry J. Reedy
More information about the Python-list
mailing list