[GVW] > > (c) for x in someDict: > > > > did. They all said, "Iterates through the _values_ in the dict", > > by analogy with (a). [Ping] > The PEP explicitly proposes that (c) be an error, because i > anticipated and specifically wanted to avoid this ambiguity. > Have you had a good look at it? > > I think your survey shows that the PEP made the right choices. > That is, it supports the position that if 'for key:value' is > supported, then 'for key:' and 'for :value' should be supported, > but 'for x in dict:' should not. It also shows that 'for index:' > should be supported on sequences, which the PEP suggests. But then we should review the wisdom of using "if x in dict" as a shortcut for "if dict.has_key(x)" again. Everything is tied together! --Guido van Rossum (home page: http://www.python.org/~guido/)
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