With all this confusion about how to actually write the iteration on dictionary items, wouldn't it make more sense to implement an extension module which then provides a __getitem__ style iterator for dictionaries by interfacing to PyDict_Next() ? The module could have three different iterators: 1. iterate over items 2. ... over keys 3. ... over values The reasoning behind this is that the __getitem__ interface is well established and this doesn't introduce any new syntax while still providing speed and flexibility. -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4