1.1 --- a/micropython/inspect.py Sun Jan 18 02:09:41 2009 +0100
1.2 +++ b/micropython/inspect.py Sat Jan 24 02:41:59 2009 +0100
1.3 @@ -156,14 +156,15 @@
1.4
1.5 # Only remove entries for classes and functions, not methods.
1.6
1.7 - for attr_value in value.assignment_values:
1.8 - if (isinstance(attr_value, Function) and not attr_value.is_method() or
1.9 - isinstance(attr_value, Class)) and not attr_value.referenced:
1.10 - pass
1.11 + if attr_value is not None:
1.12 + for attr_value in value.assignment_values:
1.13 + if (isinstance(attr_value, Function) and not attr_value.is_method() or
1.14 + isinstance(attr_value, Class)) and not attr_value.referenced:
1.15 + pass
1.16 + else:
1.17 + break
1.18 else:
1.19 - break
1.20 - else:
1.21 - del self[name]
1.22 + del self[name]
1.23
1.24 # Complain about globals not initialised at the module level.
1.25