Multipart - Counting the amount of Values for One key

Cameron Laird claird at
Sat Aug 30 02:22:21 CEST 2008

In article <mailman.248.1220053320.3487.python-list at>,
Gabriel Genellina <gagsl-py2 at> wrote:
>En Fri, 29 Aug 2008 14:41:53 -0300, Ron Brennan <brennan.ron at>  
>> I am trying to find the amount of values there are pertaining to one key.
>> For example:
>> - To find the average of the values pertaining to the key.
>> - Use the amount of values to calculate a histogram
>What is a "multipart"?  I know MIME multipart messages but they don't seem  
>to apply here...
> From your other posts I think you're talking about a dictionary mapping  
>each key to a list of values.
>So the values are contained inside a list. It doesn't matter *where* you  
>store that list, or *how* you get access to it. You have a list of values  
>- that's all.
Gabriel and other perplexed readers:  I *think* the original
questioner has in mind C++'s multimaps <URL: >, imple-
mented, among other places, in the C++ Standard Template
Library.  What puzzles *me* is his his insistence, if I 
understand him correctly, that Python's lists don't aptly
model multimap containers; from everything I know, a defin-
ing characteristic of multimap containers that they are
strictly ordered.  Perhaps someone more current in C++ can

More information about the Python-list mailing list