
claird at lairds
Aug 29, 2008, 5:22 PM
Post #3 of 3
(49 views)
Permalink
|
|
Re: Multipart - Counting the amount of Values for One key
[In reply to]
|
|
In article <mailman.248.1220053320.3487.python-list[at]python.org>, Gabriel Genellina <gagsl-py2[at]yahoo.com.ar> wrote: >En Fri, 29 Aug 2008 14:41:53 -0300, Ron Brennan <brennan.ron[at]gmail.com> >escribi�: > >> 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: http://www.cplusplus.com/reference/stl/multimap/ >, 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 explain.
|