empty classes as c structs?
Brian van den Broek
bvande at po-box.mcgill.ca
Mon Feb 7 11:10:08 EST 2005
Alex Martelli said unto the world upon 2005-02-06 18:06:
> Brian van den Broek <bvande at po-box.mcgill.ca> wrote:
> ...
>
>>(I'm just a hobbyist, so if this suggestion clashes with some well
>>established use of 'Bag' in CS terminology, well, never mind.)
>
>
> Yep: a Bag is a more common and neater name for a "multiset" -- a
> set-like container which holds each item ``a certain number of times''
> (you can alternatively see it as a mapping from items to counts of
> number of times the item is held).
>
>
> Alex
Thanks for that info. I've yet to check the link to the Bag cookbook
recipe that Carlos Ribeiro posted for me
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259174>, but
now I definitely will! (When I first learned of Python's set type, I
was disappointed there wasn't also a multi-set type.)
Thanks and best,
Brian vdB
More information about the Python-list
mailing list