1.1 --- a/inspector.py Sat Nov 26 23:05:45 2016 +0100
1.2 +++ b/inspector.py Sat Nov 26 23:07:09 2016 +0100
1.3 @@ -640,6 +640,11 @@
1.4
1.5 self.enter_namespace(name)
1.6
1.7 + # Define a name attribute value for the function instance.
1.8 +
1.9 + ref = self.get_builtin_class("string")
1.10 + self.reserve_constant(function_name, function_name, ref.get_origin())
1.11 +
1.12 # Track attribute usage within the namespace.
1.13
1.14 path = self.get_namespace_path()
1.15 @@ -1256,12 +1261,16 @@
1.16 using the optional 'ref'.
1.17 """
1.18
1.19 - init_item(self.instance_attrs, self.in_class, set)
1.20 - self.instance_attrs[self.in_class].add(name)
1.21 + self._set_instance_attr(self.in_class, name, ref)
1.22 +
1.23 + def _set_instance_attr(self, path, name, ref=None):
1.24 +
1.25 + init_item(self.instance_attrs, path, set)
1.26 + self.instance_attrs[path].add(name)
1.27
1.28 if ref:
1.29 - init_item(self.instance_attr_constants, self.in_class, dict)
1.30 - self.instance_attr_constants[self.in_class][name] = ref
1.31 + init_item(self.instance_attr_constants, path, dict)
1.32 + self.instance_attr_constants[path][name] = ref
1.33
1.34 def get_initialising_value(self, value):
1.35