>>>>> "SM" == Skip Montanaro <skip@mojam.com> writes: SM> it seems to me that the whole "if/for something in dict" thing SM> needds to be hashed out in a PEP. SM> There are apparently lots of varying opinions about what's SM> reasonable. This topic seems related to PEP 212 (Loop Counter SM> Iteration) and PEP 218 (Adding a Built-In Set Object Type), SM> but may well warrant its own. As keeper of PEP0, I have to agree. I personally would vastly prefer a new iterator protocol than syntax such as "for key:value in dict". I'd really like to see a PEP on an iterator protocol for Python, but like Skip, I'm too busy at the moment to do it myself. If nobody takes it on before then, I might be willing to champion such a PEP for the 2.2 time frame. Until then, I'm decidedly -1 on "for/if in dict". -Barry
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