Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

> 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.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35857>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to