Message29616
Logged In: YES
user_id=178886
comparing tuples by == on elements, instead of "is", would
break tuple inmutability and make them unsuitable for keys,
BTW. Doing the same with lists would make them behave
different to tuples.
Liskov and Guttag (Addison Wesley, 2001) book has and
interesting discussion on equality in collections, and how
java's model has problems (as basically any model with
mutable objects that hash on content instead of identity).
Python has been doing it right for a lot of time. |
|
Date |
User |
Action |
Args |
2007-08-23 14:42:13 | admin | link | issue1544762 messages |
2007-08-23 14:42:13 | admin | create | |
|