Message263967
here is a code show what happend:
>>> def func():
exec('ans=1')
print(dir())
return ans
>>> func()
['ans']
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
func()
File "<pyshell#4>", line 4, in func
return ans
NameError: name 'ans' is not defined
i tried this code in version 2.7,it is ok |
|
Date |
User |
Action |
Args |
2016-04-22 06:54:50 | 324857679 | set | recipients:
+ 324857679, larry |
2016-04-22 06:54:50 | 324857679 | set | messageid: <1461308090.16.0.606527103016.issue26825@psf.upfronthosting.co.za> |
2016-04-22 06:54:50 | 324857679 | link | issue26825 messages |
2016-04-22 06:54:49 | 324857679 | create | |
|