diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-14 13:08:27 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-14 13:08:27 (GMT) |
commit | f1c7ca93c1f8b72644fd52878e2fd5cbf0a45ea7 (patch) | |
tree | c3f0be3ba7da660ba44b9fee88f2e786b095357b /Lib | |
parent | 5c23b8e6ea7cdb0002842d16dbce4b4d716dd35a (diff) | |
download | cpython-f1c7ca93c1f8b72644fd52878e2fd5cbf0a45ea7.zip cpython-f1c7ca93c1f8b72644fd52878e2fd5cbf0a45ea7.tar.gz cpython-f1c7ca93c1f8b72644fd52878e2fd5cbf0a45ea7.tar.bz2 |
cgi: use isinstance(x, list) instead of type(x) == type([])
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/cgi.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -582,7 +582,7 @@ class FieldStorage: """Dictionary style get() method, including 'value' lookup.""" if key in self: value = self[key] - if type(value) is type([]): + if isinstance(value, list): return [x.value for x in value] else: return value.value @@ -593,7 +593,7 @@ class FieldStorage: """ Return the first value received.""" if key in self: value = self[key] - if type(value) is type([]): + if isinstance(value, list): return value[0].value else: return value.value @@ -604,7 +604,7 @@ class FieldStorage: """ Return list of received values.""" if key in self: value = self[key] - if type(value) is type([]): + if isinstance(value, list): return [x.value for x in value] else: return [value.value] |