Changeset 8399
- Timestamp:
- 08/15/08 21:17:55 (4 months ago)
- Files:
-
- django/trunk/django/utils/datastructures.py (modified) (1 diff)
- django/trunk/tests/regressiontests/datastructures/tests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/utils/datastructures.py
r7814 r8399 266 266 """ 267 267 return [(key, self[key]) for key in self.keys()] 268 269 def iteritems(self): 270 """ 271 Yields (key, value) pairs, where value is the last item in the list 272 associated with the key. 273 """ 274 for key in self.keys(): 275 yield (key, self[key]) 268 276 269 277 def lists(self): django/trunk/tests/regressiontests/datastructures/tests.py
r7814 r8399 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):
