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? -- http://mail.python.org/mailman/listinfo/python-list