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 324857679
Recipients 324857679, larry
Date 2016-04-22.06:54:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461308090.16.0.606527103016.issue26825@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-04-22 06:54:50324857679setrecipients: + 324857679, larry
2016-04-22 06:54:50324857679setmessageid: <1461308090.16.0.606527103016.issue26825@psf.upfronthosting.co.za>
2016-04-22 06:54:50324857679linkissue26825 messages
2016-04-22 06:54:49324857679create