Bjoern Schliessmann wrote: > Laurent Pointal wrote: > >> And so the solution to add "global foo" before using it. > > Didn't you read his final question?
Yes, and i replies: "which contains a foo assignment. As foo is not defined "global", it is considered to be local. " Maybe my explanation was not clear enough with variable foo to be considered local because there is an *assignment* to foo. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list