homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients Frederick.Ross, amaury.forgeotdarc
Date 2012年05月23日.18:52:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337799150.13.0.141984493846.issue14891@psf.upfronthosting.co.za>
In-reply-to
Content
What fails here is the evaluation of "x", not the assignment!
You are right concerning the assignment, the outer definition has no effect at all. The very presence of "x = " in the function code turns x into a local variable for the whole function; so 'x + "a"' fails because the local variable has not value yet.
Python, unlike Lisp, defines scopes lexically, not dynamically. There is no "previous" binding, but "local" or "outer" scopes.
History
Date User Action Args
2012年05月23日 18:52:30amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, Frederick.Ross
2012年05月23日 18:52:30amaury.forgeotdarcsetmessageid: <1337799150.13.0.141984493846.issue14891@psf.upfronthosting.co.za>
2012年05月23日 18:52:29amaury.forgeotdarclinkissue14891 messages
2012年05月23日 18:52:29amaury.forgeotdarccreate

AltStyle によって変換されたページ (->オリジナル) /