# HG changeset patch # User Paul Boddie # Date 1202080746 -3600 # Node ID 6594784030c67f32959288b25c7a32128fce49c1 # Parent 4ce6389cdf070e04e3ca027d2f8dd7fd58a01138 Fixed all_objects to only record distinct objects. diff -r 4ce6389cdf07 -r 6594784030c6 micropython/inspect.py --- a/micropython/inspect.py Sat Feb 02 02:32:37 2008 +0100 +++ b/micropython/inspect.py Mon Feb 04 00:19:06 2008 +0100 @@ -483,7 +483,7 @@ # Complete lists of classes and functions. - self.all_objects = [] + self.all_objects = set() # Constant records. @@ -610,7 +610,7 @@ # Record all non-local objects. if not (self.namespaces and isinstance(self.namespaces[-1], Function)): - self.all_objects.append(obj) + self.all_objects.add(obj) def store_attr(self, name):