On Wed, Apr 24, 2002 at 08:47:25AM -0400, Guido van Rossum wrote: > > If you consider lists to be a special dictionary > > with implicit keys we can define 'items' to > > generate (key,value) pairs for a collection so that > > > > for key,value in items(collection): > > collection[key]==value > > > > holds no matter if collection is a list or a dictionary, > > This has been proposed and rejected before. We've made the decision > that "iter(dict)" iterates over the keys while "iter(list)" iterates > over the values, and anything that tries to unify the two types > (really categories of types: sequences and mappings) is bound to fail. ok, i am fine with that. after all i can always define my own 'items' or maybe better 'keyvalues' method to achieve the unification where needed :-) regarding PEP279 i go with 'itemize' ... holger
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