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 berker.peksag
Recipients Digitalxero, ajaksu2, berker.peksag, damngamerz, dharriso, eric.araujo, isandler, pitrou, relm, rhettinger, serhiy.storchaka, sonderblade
Date 2017-02-06.02:47:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486349238.3.0.172123511088.issue968063@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-02-06 02:47:18berker.peksagsetrecipients: + berker.peksag, rhettinger, isandler, sonderblade, pitrou, ajaksu2, relm, dharriso, eric.araujo, Digitalxero, serhiy.storchaka, damngamerz
2017-02-06 02:47:18berker.peksagsetmessageid: <1486349238.3.0.172123511088.issue968063@psf.upfronthosting.co.za>
2017-02-06 02:47:18berker.peksaglinkissue968063 messages
2017-02-06 02:47:16berker.peksagcreate