[issue8515] idle "Run Module" (F5) does not set __file__ variable
Tal Einat
report at bugs.python.org
Sat Jun 12 00:03:53 CEST 2010
Tal Einat <taleinat at users.sourceforge.net> added the comment:
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).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8515>
_______________________________________
More information about the Python-bugs-list
mailing list