summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-10-21 16:45:00 (GMT)
committerFred Drake <fdrake@acm.org>2003-10-21 16:45:00 (GMT)
commit8c4da53afedd7b7fa49f7209582b2f61d80f457e (patch)
tree733898e37c80d5c137749ec714ddbb445275016f /Lib/ConfigParser.py
parentde05032cc9d844f30c91d564298581244b53285d (diff)
downloadcpython-8c4da53afedd7b7fa49f7209582b2f61d80f457e.zip
cpython-8c4da53afedd7b7fa49f7209582b2f61d80f457e.tar.gz
cpython-8c4da53afedd7b7fa49f7209582b2f61d80f457e.tar.bz2
Make both items() methods return lists; one had changed to return an
iterator where it probably shouldn't have. Closes SF bug #818861.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 7503ba2..d98993a 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