New submission from Ivo van der Wijk <python....@in.m3r.nl>: 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. ---------- components: Interpreter Core messages: 117731 nosy: iivvoo priority: normal severity: normal status: open title: function named 'top' gets unexpected namespace/scope behaviour type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com