[EMAIL PROTECTED] wrote: >>Steve Holden wrote: >>Consider: > > > >>> a = {1:'one'} > >>> b = {2:'two'} > >>> c = {1:'one'} > >>> a is c > False > >>> a in [b, c] > True > >>> > > >>What would you have Python do differently in these circumstances? > > > You mean: What i would do i if i was the benevolent dictator ? > I would make a distinction between mutables and immutables. Immutables > would test for equality and mutables would test for identity.
Which is exactly the wrong way round. > Membership testing for objects is a very common use case which is > totally unrelated to their being sorted according to a key. > I am no expert on languages so i could be wrong. Don't hesitate to > correct me. > Alain > It's not worth bothering - just work with Python how it is, and enjoy the language! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ -- http://mail.python.org/mailman/listinfo/python-list