A
Attila Szabo
Hi,
I wrote this sample piece of code:
def main():
lambda x: 'ABC%s' % str(x)
for k in range(2): exec('print %s' % k)
main()
With the lambda line, I get this:
SyntaxError: unqualified exec is not allowed in function 'main'
it contains a nested function with free variables
Without the lambda, it's ok...
What's this ?
thanks
I wrote this sample piece of code:
def main():
lambda x: 'ABC%s' % str(x)
for k in range(2): exec('print %s' % k)
main()
With the lambda line, I get this:
SyntaxError: unqualified exec is not allowed in function 'main'
it contains a nested function with free variables
Without the lambda, it's ok...
What's this ?
thanks