From: Fred Drake Date: Tue, 21 Oct 2003 16:46:52 +0000 (+0000) Subject: Make both items() methods return lists; one had changed to return an X-Git-Tag: v2.3.3c1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbb6be0a2c51c06947c56671369c4e30c399b8a5;p=thirdparty%2FPython%2Fcpython.git Make both items() methods return lists; one had changed to return an iterator where it probably shouldn't have. Closes SF bug #818861. --- diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index 7503ba29a1d8..d98993af3315 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -542,12 +542,11 @@ class ConfigParser(RawConfigParser): if "__name__" in options: options.remove("__name__") if raw: - for option in options: - yield (option, d[option]) + return [(option, d[option]) + for option in options] else: - for option in options: - yield (option, - self._interpolate(section, option, d[option], d)) + return [(option, self._interpolate(section, option, d[option], d)) + for option in options] def _interpolate(self, section, option, rawval, vars): # do the string interpolation