Johan Hahn wrote:
Wouldn't it be nice if list.count, called without any arguments,
returned a dict with the list's unique items as keys and their
frequency of occurance as values?

No. It would require all sequences to support this protocol, which would be tedious to implement. Some day, we may have a bag type, so it would be better if this type supported frequency counting.

Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to