1.1 --- a/micropython/data.py Mon Jun 08 00:49:37 2009 +0200
1.2 +++ b/micropython/data.py Fri Jun 12 22:03:56 2009 +0200
1.3 @@ -352,8 +352,14 @@
1.4
1.5 self.context_values.update(context_values)
1.6
1.7 - def is_class_attribute(self):
1.8 - return isinstance(self.parent, Class)
1.9 + def is_static_attribute(self):
1.10 +
1.11 + """
1.12 + Return whether this attribute is defined on a fixed/static object such
1.13 + as a class or a module.
1.14 + """
1.15 +
1.16 + return isinstance(self.parent, (Class, Module))
1.17
1.18 def defined_within_hierarchy(self):
1.19
1.20 @@ -1222,7 +1228,7 @@
1.21 return [
1.22 DataObject(
1.23 objtable.as_list().get_code(self.full_name()),
1.24 - None, # NOTE: module name not used as an attribute, but should be instance
1.25 + None, # modules treated like classes
1.26 None,
1.27 self.full_name(),
1.28 len(self.module_attributes()) + 1 # size