Message287069
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. |
|
Date |
User |
Action |
Args |
2017-02-06 02:47:18 | berker.peksag | set | recipients:
+ berker.peksag, rhettinger, isandler, sonderblade, pitrou, ajaksu2, relm, dharriso, eric.araujo, Digitalxero, serhiy.storchaka, damngamerz |
2017-02-06 02:47:18 | berker.peksag | set | messageid: <1486349238.3.0.172123511088.issue968063@psf.upfronthosting.co.za> |
2017-02-06 02:47:18 | berker.peksag | link | issue968063 messages |
2017-02-06 02:47:16 | berker.peksag | create | |
|