SyntaxError: unqualified exec is not allowed in ... ?
j vickroy
jim.vickroy at noaa.gov
Wed Oct 8 12:22:34 EDT 2003
More information about the Python-list mailing list
Wed Oct 8 12:22:34 EDT 2003
- Previous message (by thread): SyntaxError: unqualified exec is not allowed in ... ?
- Next message (by thread): removing ignorable whitespace from minidom.DOM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could someone help me understand the following Python 2.3 error message:
SyntaxError: unqualified exec is not allowed in function 'load' it contains
a nested function with free variables
in the following context:
class Spam(object): pass
class Spammer(object):
...
def load(self):
...
exec 'o = %s()' % Spam.__name__
...
Thanks.
P.S.
I would provide a simple script demonstrating the problem, but, so far, I
have not been able to reproduce the error in a simple context.
- Previous message (by thread): SyntaxError: unqualified exec is not allowed in ... ?
- Next message (by thread): removing ignorable whitespace from minidom.DOM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list