Tal Einat <talei...@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 <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to