Counter Class -- Bag/Multiset

msrachel.e at gmail.com msrachel.e at gmail.com
Fri Jan 23 02:29:48 EST 2009


On Jan 22, 5:41 pm, Giovanni Bajo <ra... at develer.com> wrote:
> * I find it *very* confusing c.items() vs c.elements(). Items and
> elements are synonymous (again, in my understanding of English).

Would have used the term "items" but that term has a different meaning
in the context of dictionaries where "items" means (key,value) pairs.
The word "elements" is used for members of the set object and has a
parallel meaning in the context of multisets.  Since the class is a
dict subclass (as recommended by Guido), the term "items" was off
limits because it means something else.  So, "elements" as used in the
sets documentation was the next, natural choice.

Raymond



More information about the Python-list mailing list