Barry A. Warsaw wrote: > > Second, I'm still not totally comfortable with the "for keys:values in > dict" part of the proposal, especially with the elaboration of letting > either keys or values be missing. An alternative, which I sure has > been raised, but which isn't in the PEP, is to allow an alternative > pseudo-keyword in the `in' position. For example, allow "over" which > has the semantics when used with a dict of iterating over keys.items() > and when iterating over a sequence has the semantics of iterating over > zip(range(len(a)), a). Thus only this would be allowed: > > for key, value over dict: > > for index, item over seq: +1 from me, particularly the part about getting rid of "keys:values"; I just see little advantage to using anything other than a tuple. -- --- Aahz (@pobox.com) Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ Androgynous poly kinky vanilla queer het Pythonista I don't really mind a person having the last whine, but I do mind someone else having the last self-righteous whine.
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