Emily Morehouse added the comment: This is the expected functionality of linecache. As each file is read, it is stored in a cache, subsequent calls using linecache do not check to see if the file has changed.
If you know that the file has changed, you should call linecache.checkcache() to check all files or linecache.checkcache(filename) to check a specific file. (https://docs.python.org/2/library/linecache.html#linecache.checkcache) [Since no one is listed in the Experts Index, I've included some other contributors to linecache who can assist in closing out this issue] ---------- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) nosy: +emilyemorehouse, gvanrossum, rhettinger, serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30763> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com