# HG changeset patch # User Paul Boddie # Date 1336416403 -7200 # Node ID 176e561989549ca029b43013a9796f3c9a75fcaa # Parent 9787cf0491a8b5e0fec3e3c3e7bec87468ab08d1 Fixed hashing of ObjectSet instances. Added explicit labelling to the Attr string representation. diff -r 9787cf0491a8 -r 176e56198954 micropython/common.py --- a/micropython/common.py Wed May 02 01:03:55 2012 +0200 +++ b/micropython/common.py Mon May 07 20:46:43 2012 +0200 @@ -72,7 +72,9 @@ # Set membership and comparisons. def __hash__(self): - return hash(tuple(self.keys())) + l = self.keys() + l.sort() + return hash(tuple(l)) def __eq__(self, other): if hasattr(other, "objects"): diff -r 9787cf0491a8 -r 176e56198954 micropython/data.py --- a/micropython/data.py Wed May 02 01:03:55 2012 +0200 +++ b/micropython/data.py Mon May 07 20:46:43 2012 +0200 @@ -1114,7 +1114,7 @@ position = "at %r, " % self.position else: position = "" - return "<%s.%s (%sassigned %r)>" % ( + return "" % ( shortrepr(self.parent), self.name, position, self.assignments )