[Python-checkins] python/dist/src/Lib cgi.py,1.81,1.82
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Dec 31 22:59:05 CET 2004
- Previous message: [Python-checkins] python/dist/src/Lib SimpleHTTPServer.py, 1.22,
1.23 SocketServer.py, 1.37, 1.38 cgi.py, 1.80, 1.81 gettext.py,
1.24, 1.25 mhlib.py, 1.37, 1.38 tarfile.py, 1.21,
1.22 urllib.py, 1.165, 1.166 urlparse.py, 1.45, 1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5023
Modified Files:
cgi.py
Log Message:
Remove some lambdas.
Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- cgi.py 31 Dec 2004 19:15:26 -0000 1.81
+++ cgi.py 31 Dec 2004 21:59:02 -0000 1.82
@@ -34,6 +34,7 @@
# Imports
# =======
+from operator import attrgetter
import sys
import os
import urllib
@@ -331,7 +332,7 @@
Return the main content-type and a dictionary of options.
"""
- plist = map(lambda x: x.strip(), line.split(';'))
+ plist = [x.strip() for x in line.split(';')]
key = plist.pop(0).lower()
pdict = {}
for p in plist:
@@ -570,7 +571,7 @@
if key in self:
value = self[key]
if type(value) is type([]):
- return map(lambda v: v.value, value)
+ return map(attrgetter('value'), value)
else:
return value.value
else:
@@ -592,7 +593,7 @@
if key in self:
value = self[key]
if type(value) is type([]):
- return map(lambda v: v.value, value)
+ return map(attrgetter('value'), value)
else:
return [value.value]
else:
- Previous message: [Python-checkins] python/dist/src/Lib SimpleHTTPServer.py, 1.22,
1.23 SocketServer.py, 1.37, 1.38 cgi.py, 1.80, 1.81 gettext.py,
1.24, 1.25 mhlib.py, 1.37, 1.38 tarfile.py, 1.21,
1.22 urllib.py, 1.165, 1.166 urlparse.py, 1.45, 1.46
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list