mozilla/configman — comment on commit c5291a53afe6c5502370e6b82aa5f1f05bd881aa
File: demo/advanced_demo3.py line 309
By peterbe:

Then why use `iteritems`? It's never a big enough dict to "need" a generator. In fact, python3, iteritems() is going away and will have the same functionality but be called `items()` instead.

This works perfectly fine in py3:

```python
people = {
'fred': 'FRED',
'wilma': 'WILMA',
}
search_for= 'WILMA'
for name, conn in people.items():
if conn == search_for:
del people[name]
break

assert people == {'fred': 'FRED'}
```
http://ideone.com/GnOGP
That pattern has the advantage that it doesn't depend on the matching ever being done.