[Tim] > Anyone remember why setdefault's second argument is optional? IIRC, this is a vestige from its ancestor. The proposal for setdefault() described it as behaving like dict.get() but inserting the key if not found. > Haven't found > any 1-arg uses of setdefault() either, except for test code verifying > that you _can_ omit the second arg. Likewise, I found zero occurrences in the library, in my cumulative code base, and in the third-party packages on my system. > If there isn't a sane use case for leaving the second argument out, > I'd like to drop the possibility in P3K (assuming setdefault() > survives). Give a lack of legitimate use cases, do we have to wait to Py3.0? It could likely be fixed directly and not impact any code that people care about. Raymond
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