Steven Bethard wrote: > Guido commented in the tracker that it would be worth discussing > whether that last item (``item_counts['d']``) should return 0 (as a > defaultdict would) or raise KeyError (as a dict would). If you've asked for a count of 'd's, and there aren't any 'd's, the most sensible answer would seem to be 0, not an exception. Also it would be a useful property if you were guaranteed that all items in the input sequence are usable as keys in the result without causing an exception. -- Greg
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