# HG changeset patch # User Paul Boddie # Date 1226182305 -3600 # Node ID 06a8cc27a08a626a60fade7629d656fa38112a29 # Parent 5272000fc62e64a3e5b70fe5bb16e9b114b1e9f1 Upheld the class/function restrictions on removing objects. diff -r 5272000fc62e -r 06a8cc27a08a micropython/inspect.py --- a/micropython/inspect.py Sat Nov 08 23:09:48 2008 +0100 +++ b/micropython/inspect.py Sat Nov 08 23:11:45 2008 +0100 @@ -179,7 +179,8 @@ all_objects = list(self.all_objects) for obj in all_objects: - if not obj.referenced: + if (isinstance(obj, Function) and not obj.is_method() or + isinstance(obj, Class)) and not obj.referenced: self.all_objects.remove(obj) def add_object(self, obj, any_scope=0):