[issue30763] There is functionality bug in linecache library.

2017-06-27 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pytho

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Emily and Guido. This is not a bug. Maybe this should be documented more explicitly if "cache" in the name is not enough, I don't know. I have no any special relation to the linecache module, maybe just once fixed a bug or two. -- ___

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: You nailed it, Emily! This is not a bug (though the docs could be a bit more upfront about this -- just having "cache" in the name doesn't cut it these days :-). If either Serhiy or Raymond agrees they can close the issue (we won't wait for the third vote).

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Emily Morehouse
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 che

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Yang Xiao
Yang Xiao added the comment: Sorry, there is a mistake in msg296874. The expectant output shoule be: ['good morning\n'] ['good evening\n'] ['good morning 123\n'] ['good evening 123\n'] -- ___ Python tracker __

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Yang Xiao
New submission from Yang Xiao: There is a functionality bug in linecache library. >>test.py<< import linecache def test_getline(f): print linecache.getlines(f) if __name__ == "__main__": tf1 = 'aaa' with open(tf1,'w') as f: f.write('good morning\n') test_getline(tf1)