Message107593
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). |
|
Date |
User |
Action |
Args |
2010-06-11 22:03:53 | taleinat | set | recipients:
+ taleinat, dangyogi |
2010-06-11 22:03:53 | taleinat | set | messageid: <1276293833.09.0.546023506283.issue8515@psf.upfronthosting.co.za> |
2010-06-11 22:03:51 | taleinat | link | issue8515 messages |
2010-06-11 22:03:51 | taleinat | create | |
|