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 steven.daprano
Recipients Steve Pryde, steven.daprano
Date 2019-01-30.09:34:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548840859.26.0.91037982748.issue35857@roundup.psfhosted.org>
In-reply-to
Content
> It should instead show the lines from the file as it was when the code was executed.

How is Python supposed to do that without making a copy of every module and script it runs just in case it gets modified?

(That's not a rhetorical question -- if you can think of a cheap way to implement this, I'm listening :-)

99.99% of the time this would be a total waste of time, so this would be a very expensive exercise for very little gain. Python's startup time is already too slow without having to also make potentially hundreds of file copies every time you run a script.

For the record, I too once ran into this issue. It left me utterly confused for an hour or so until I worked out what was happening, and then I never made the mistake of editing a running script again.
History
Date User Action Args
2019-01-30 09:34:21steven.dapranosetrecipients: + steven.daprano, Steve Pryde
2019-01-30 09:34:19steven.dapranosetmessageid: <1548840859.26.0.91037982748.issue35857@roundup.psfhosted.org>
2019-01-30 09:34:19steven.dapranolinkissue35857 messages
2019-01-30 09:34:19steven.dapranocreate