I like count() and appendlist() or whatever they will be named. But I
have one question/idea:

Why does the methods have to be put in dict? Can't their be a subtype
of dict that includes those two methods? I.e.:

.histogram = counting_dict()
.for ch in text:
.    histogram.count(ch)

Then maybe some more methods can be added tailor-mode for these two
types of dicts?:

.for ch in string.ascii_letters:
.    print "Frequency of %s = %d." % (ch, histogram.freq(ch))

Or something, you get the idea.

-- 
mvh Björn
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to