Berker Peksag added the comment:

Thanks for the updated patch, but I'm not sure FileInput class needs a 
islastline() method. I couldn't find any similar or duplicate feature requests 
on the tracker after this opened in 2004 (which is a sign that the need for 
this method is low.)

Also, the patch needs some work. Some comments:

* There is no documentation changes to Doc/library/fileinput.rst
* 'mark' is unused in Lib/fileinput.py
* Not sure why we need 't1 = t2 = t3 = None' in tests
* We could use self.addCleanup() instead of 'try...finally'
* fileinput.islastline() is not tested. We could reuse 
Test_fileinput_isfirstline.

According to commit history of Lib/fileinput.py, Serhiy has done a lot of work 
in the past few years. I just added him to nosy list to get his feedback.

----------
nosy: +berker.peksag, serhiy.storchaka
stage: needs patch -> patch review
versions: +Python 3.7 -Python 3.4

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

Reply via email to