Cameron Laird wrote:

> In article <[EMAIL PROTECTED]>,
> Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>>Martin Marcher wrote:
>>
>>> On 2008-08-26 00:32:20, cnb wrote:
>>>> Are dictionaries the same as hashtables?
> .
> .
> .
>>Python does not have a "one key maps to a list of values"-semantics -
>>which I consider the sane choice...
>>
>>However, you can have that using the defaultdict for example:
>>
>>listdict = defaultdict(list)
>>
>>listdict[key].append(value)
>>
>>Diez
> 
> ?  I'm lost.  As I understand your terms, Python's dictionaries
> map keys to objects, but you would prefer that Python's
> dictionaries map keys only to lists of values.  That *sounds*
> like a complexification, at best.  Are you trying to make a
> point about implementation aligning with semantics?

The OP seems to want that (or at least sees it as one of two viable design
choices), see his other answer in this thread.

I certainly *don't* agree with that, I merely pointed out that python comes
with means to easily create such a data-structure in the case it is needed.

Diez
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to