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 iivvoo
Recipients iivvoo
Date 2010-09-30.12:17:40
SpamBayes Score 2.3986418e-08
Marked as misclassified No
Message-id <1285849061.79.0.383989167237.issue9997@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is also discussed on Stackoverflow: http://stackoverflow.com/q/3828611/320057

The following code

def top(deck):
    pass

def b():
    global deck

results in the error "SyntaxError: name 'deck' is local and global" (slightly different for 3.x). This is strange by itself, and is caused by special namespace behaviour attached to the "top" symbol. Renaming the "top" function actually solves the error!

More technical details are in the stackoverflow link above.
History
Date User Action Args
2010-09-30 12:17:41iivvoosetrecipients: + iivvoo
2010-09-30 12:17:41iivvoosetmessageid: <1285849061.79.0.383989167237.issue9997@psf.upfronthosting.co.za>
2010-09-30 12:17:40iivvoolinkissue9997 messages
2010-09-30 12:17:40iivvoocreate