This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_file_iter(*ar, **kw): | |
""" | |
Small utility to iterate through individual rows of a file given a generator, | |
used only to count rows. | |
:param ar: args for open() | |
:param kw: keyword args for open() | |
:return: yields 1 for each row | |
""" | |
for _ in open(*ar, **kw): |
OlderNewer