2008-11-08 | Paul Boddie | raw files shortlog changelog graph | Upheld the class/function restrictions on removing objects. | |
micropython/inspect.py (file) |
1.1 --- a/micropython/inspect.py Sat Nov 08 23:09:48 2008 +0100 1.2 +++ b/micropython/inspect.py Sat Nov 08 23:11:45 2008 +0100 1.3 @@ -179,7 +179,8 @@ 1.4 all_objects = list(self.all_objects) 1.5 1.6 for obj in all_objects: 1.7 - if not obj.referenced: 1.8 + if (isinstance(obj, Function) and not obj.is_method() or 1.9 + isinstance(obj, Class)) and not obj.referenced: 1.10 self.all_objects.remove(obj) 1.11 1.12 def add_object(self, obj, any_scope=0):