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 mark.dickinson
Recipients Andreas Hofmeister, mark.dickinson
Date 2010-06-21.19:52:40
SpamBayes Score 0.0014038152
Marked as misclassified No
Message-id <>
This isn't a bug;  it's by design.

Because there's an assignment to 'a' in the function 'y', 'a' is considered local to that function.  (It doesn't matter where the assignment happens within the function;  the presence of an assignment anywhere is enough to make 'a' local for the entirety of 'y'.)

This is described in the reference manual at:

See the paragraph beginning:

"If a name binding operation occurs anywhere within a code block, "
Date User Action Args
2010-06-21 19:52:42mark.dickinsonsetrecipients: + mark.dickinson, Andreas Hofmeister
2010-06-21 19:52:42mark.dickinsonsetmessageid: <>
2010-06-21 19:52:40mark.dickinsonlinkissue9049 messages
2010-06-21 19:52:40mark.dickinsoncreate