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 dharriso
Recipients
Date 2004-07-04.11:24:45
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1076674

I would say that I'm -0.5 on this feature.  After looking
over the current code for fileinput.py in the cvs tree, it
looks like the current code implements an iterator model. 
Since fileinput.py uses the next() call to move along its
input, and raises StopIteration if there are no more lines
to be returned, this function would have to be polled to
find out if the final line had been reached - where a
try/except block that caught StopIteration would seem more
intuitive to me (Inkeeping with the current code).

However it might be considered that the nextfile() function
be changed to raise StopIteration after the last file had
been completed to maintain consistency between the lines and
files aspects of the class.
History
Date User Action Args
2007-08-23 15:38:04adminlinkissue968063 messages
2007-08-23 15:38:04admincreate