bags? 2.5.x?
Paul Rubin
http
Sat Feb 2 04:17:34 EST 2008
Arnaud Delobelle <arnodel at googlemail.com> writes:
> * For sets {x, y} union {y, z} = {x, y, z}. The natural way of
> extending this to multisets is having the union operator take the
> max of the multiplicities of each element, i.e.
That certainly doesn't fit the intuition of a bag of objects. I'd
think of the union of two bags as the result of dumping the contents
of both bags onto the table, i.e. you'd add the two vectors.
> * Similarly, for intersection one would take the min of
> multiplicities, i.e.
This is a reasonable interpretation I guess.
> A difference B = A - (A intersection B)
I think difference would mean subtraction.
More information about the Python-list
mailing list