Re: [Tutor] Functional question

2005-08-06 Thread Kent Johnson
Bernard Lebel wrote: > Thanks Kent. > > I had tried the very same thing, but with a list instead of a tuple, > and got an got this: > > dMap[ ['allo','bonjour'] ] = 'salut' > > Traceback (most recent call last): > File "", line 1, in ? > TypeError: list objects are unhashable > > It neve

Re: [Tutor] Functional question

2005-08-05 Thread Bernard Lebel
Thanks Kent. I had tried the very same thing, but with a list instead of a tuple, and got an got this: >>> dMap[ ['allo','bonjour'] ] = 'salut' Traceback (most recent call last): File "", line 1, in ? TypeError: list objects are unhashable It never crossed my mind that a tuple would do it. T

Re: [Tutor] Functional question

2005-08-05 Thread Kent Johnson
Bernard Lebel wrote: > Hello, > > This question is not strictly bound to Python, but rather some > functional programming problem, I hope someone can help me or suggest > ressources. > > 1 -- > I have a list of lists. Each of these lists has 3 elements: a string, > and two integers. Thoughout the

[Tutor] Functional question

2005-08-05 Thread Bernard Lebel
Hello, This question is not strictly bound to Python, but rather some functional programming problem, I hope someone can help me or suggest ressources. 1 -- I have a list of lists. Each of these lists has 3 elements: a string, and two integers. Thoughout the lists, there are only two different in