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 Drekin
Recipients Drekin
Date 2013-06-30.14:33:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372602782.77.0.618152195123.issue18331@psf.upfronthosting.co.za>
In-reply-to
Content
Let's have a simple script test.py:
def f():
	return x
x = 2
print(f())

Now if we try to run it via runpy.run_path, we get the following:
>>> import runpy
>>> g = runpy.run_path("test.py")
2
>>> g["f"]() is None
True
>>> g["x"] is 2
True
>>> g["f"].__globals__["x"] is None
True

Is the behaviour of f.__globals__ after return from run_path intended and why?
History
Date User Action Args
2013-06-30 14:33:02Drekinsetrecipients: + Drekin
2013-06-30 14:33:02Drekinsetmessageid: <1372602782.77.0.618152195123.issue18331@psf.upfronthosting.co.za>
2013-06-30 14:33:02Drekinlinkissue18331 messages
2013-06-30 14:33:02Drekincreate