| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,13 +74,11 @@ | |||
| 74 | 74 | # (when whilematch is false), is lost, and fileiter will resume at the line | |
| 75 | 75 | # following it. | |
| 76 | 76 | def read(fileiter, pat, whilematch): | |
| 77 | - result = [] | ||
| 78 | 77 | for line in fileiter: | |
| 79 | 78 | if bool(pat.match(line)) == whilematch: | |
| 80 | - result.append(line) | ||
| 79 | + yield line | ||
| 81 | 80 | else: | |
| 82 | 81 | break | |
| 83 | - return result | ||
| 84 | 82 | ||
| 85 | 83 | def combine(fname): | |
| 86 | 84 | f = file(fname) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments