From: Tim Peters Date: Fri, 18 Apr 2003 01:02:37 +0000 (+0000) Subject: Heh -- I checked in an old version of this, at a time I documented the X-Git-Tag: v2.3c1~1133 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d17a90b830ae9b9c672a504f01d4f93bac3d23d;p=thirdparty%2FPython%2Fcpython.git Heh -- I checked in an old version of this, at a time I documented the internal read() as being a generator but hadn't yet changed it into one. --- diff --git a/Tools/scripts/combinerefs.py b/Tools/scripts/combinerefs.py index 3fafd9b2431e..edd1a860a5d7 100644 --- a/Tools/scripts/combinerefs.py +++ b/Tools/scripts/combinerefs.py @@ -74,13 +74,11 @@ import sys # (when whilematch is false), is lost, and fileiter will resume at the line # following it. def read(fileiter, pat, whilematch): - result = [] for line in fileiter: if bool(pat.match(line)) == whilematch: - result.append(line) + yield line else: break - return result def combine(fname): f = file(fname)