Use list comprehension for multidict getall #89

Merged
merged 1 commit into from Jan 29, 2013
+1 −5
View
6 webob/multidict.py
@@ -115,11 +115,7 @@ def getall(self, key):
"""
Return a list of all values matching the key (may be an empty list)
"""
- result = []
- for k, v in self._items:
- if key == k:
- result.append(v)
- return result
+ return [v for k, v in self._items if k == key]
def getone(self, key):
"""