Gregory Ewing <greg.ew...@canterbury.ac.nz>:

> Marko Rauhamaa wrote:
>> What I'm saying is that Python does not prevent mutable keys but
>> tries to do that with lists and tuples.
>>
>> I think Python should stop trying.
>
> Do you volunteer to answer all the posts from beginners complaining
> that "the dict type is broken" because they used a list as a key and
> then mutated it?

What happened to consenting adults?

Even Java (of all languages) allows lists to be keys and simply notes:

   Note: great care must be exercised if mutable objects are used as map
   keys.

   <URL: http://docs.oracle.com/javase/7/docs/api/java/util/Map.html>


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to