Ticket #7331: 7331.diff
File 7331.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/utils/datastructures.py
266 266 """ 267 267 return [(key, self[key]) for key in self.keys()] 268 268 269 def iteritems(self): 270 """ 271 Yields (key, value) pairs, where value is the last item in 272 the list associated with the key. 273 """ 274 for key in self.keys(): 275 yield (key, self[key]) 276 269 277 def lists(self): 270 278 """Returns a list of (key, list) pairs.""" 271 279 return super(MultiValueDict, self).items() -
tests/regressiontests/datastructures/tests.py
42 42 'Simon' 43 43 >>> d.getlist('name') 44 44 ['Adrian', 'Simon'] 45 >>> list(d.iteritems()) 46 [('position', 'Developer'), ('name', 'Simon')] 45 47 >>> d['lastname'] 46 48 Traceback (most recent call last): 47 49 ...