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 eric.smith
Recipients eric.smith, ssc
Date 2010-10-07.11:31:49
SpamBayes Score 2.6525799e-05
Marked as misclassified No
Message-id <1286451112.95.0.78255995703.issue10043@psf.upfronthosting.co.za>
In-reply-to
Content
When python sees the assignment "name = None", it assumes that 'name' is a local variable. This happens before any code is executed. It then sees that you're printing 'name' before it is assigned to, which is an error. It does not take into account the dynamic creation of the module level variable.
History
Date User Action Args
2010-10-07 11:31:53eric.smithsetrecipients: + eric.smith, ssc
2010-10-07 11:31:52eric.smithsetmessageid: <1286451112.95.0.78255995703.issue10043@psf.upfronthosting.co.za>
2010-10-07 11:31:49eric.smithlinkissue10043 messages
2010-10-07 11:31:49eric.smithcreate