summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/text_file.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-26 20:09:45 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-26 20:09:45 (GMT)
commit61cb0873591f9c43c1e10fcbe611c43f943c7c90 (patch)
treefa2cf90f0051355baafb184641a1385dafcc1a7e /Lib/distutils/text_file.py
parent9a2310d1b6b80bae072892de04464d23b1e88881 (diff)
downloadcpython-61cb0873591f9c43c1e10fcbe611c43f943c7c90.zip
cpython-61cb0873591f9c43c1e10fcbe611c43f943c7c90.tar.gz
cpython-61cb0873591f9c43c1e10fcbe611c43f943c7c90.tar.bz2
Remove incorrect usages of map() in distutils.
Reported by Lisandro Dalcin.
Diffstat (limited to 'Lib/distutils/text_file.py')
-rw-r--r--Lib/distutils/text_file.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/text_file.py b/Lib/distutils/text_file.py
index db054fd..266466c 100644
--- a/Lib/distutils/text_file.py
+++ b/Lib/distutils/text_file.py
@@ -292,7 +292,7 @@ line 3 \\
continues on next line
"""
# result 1: no fancy options
- result1 = map(lambda x: x + "\n", test_data.split("\n")[0:-1])
+ result1 = [x + "\n" for x in test_data.split("\n")[:-1]]
# result 2: just strip comments
result2 = ["\n",
@@ -357,4 +357,5 @@ line 3 \\
join_lines=1, rstrip_ws=1, collapse_join=1)
test_input(6, "join lines with collapsing", in_file, result6)
+ del in_file
os.remove(filename)