Steven Bethard wrote:

For me dictionary is a collection of key-value pairs, but not a
collection of keys (that's what set is).

Ahh, ok. Now I understand. I think you could probably search the python-dev archives and see why the decision was made as it was. For pretty much all my purposes, "key in dict" is much more useful than "item in dict". Practicality beats Purity and all. ;)

well, for all my purposes, I find that "dict.get(key)" (or sometimes "dict[key]" is a lot more useful than has_key and in...

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to