diff options
author | Raymond Hettinger <python@rcn.com> | 2004-12-31 21:59:02 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-12-31 21:59:02 (GMT) |
commit | f871d833dd2a99d93ebdc4aa4cc07bd4afe9be61 (patch) | |
tree | 16617b5bbfb3dae406563aa5ec87a4a32c74a807 | |
parent | a617271dbd150549b021a5161d009869ad62f7b2 (diff) | |
download | cpython-f871d833dd2a99d93ebdc4aa4cc07bd4afe9be61.zip cpython-f871d833dd2a99d93ebdc4aa4cc07bd4afe9be61.tar.gz cpython-f871d833dd2a99d93ebdc4aa4cc07bd4afe9be61.tar.bz2 |
Remove some lambdas.
-rwxr-xr-x | Lib/cgi.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -34,6 +34,7 @@ __version__ = "2.6" # Imports # ======= +from operator import attrgetter import sys import os import urllib @@ -331,7 +332,7 @@ def parse_header(line): 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 @@ class FieldStorage: 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 @@ class FieldStorage: 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: |