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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to