On Wed, 2010-03-03 at 15:35 -0500, Stefan Seefeld wrote: > > > > I tried stepping through the code with gdb, but I got lost ... What am > > I missing ? TIA > > Python requires dictionary keys to be immutable. I wouldn't be surprised > if it used object identity checks (such as address comparison) instead > of a deep equal test, as a faster way to look up objects. >
That's exactly what it does, unless your object implements the __hash__ special method. Do that (and in so doing, promise that the return value of __hash__ will never change), and this should work. Jim Bosch _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig