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 taleinat
Recipients dangyogi, taleinat
Date 2010-06-11.22:03:51
SpamBayes Score 0.003665393
Marked as misclassified No
Message-id <1276293833.09.0.546023506283.issue8515@psf.upfronthosting.co.za>
In-reply-to
Content
Why doesn't execfile() set __file__? I would be surprised if this is due to an oversight by the Python devs. In both execfile and IDLE's "Run Module" I can't think of a reason not to set __file__, but perhaps this was intentional? Googling a bit hasn't brought up much.

I am currently of the opinion that both IDLE and execfile() should set __file__ (with execfile() perhaps requiring more thinking about edge-cases, since it can be passes locals and globals dictionaries).
History
Date User Action Args
2010-06-11 22:03:53taleinatsetrecipients: + taleinat, dangyogi
2010-06-11 22:03:53taleinatsetmessageid: <1276293833.09.0.546023506283.issue8515@psf.upfronthosting.co.za>
2010-06-11 22:03:51taleinatlinkissue8515 messages
2010-06-11 22:03:51taleinatcreate