1.1 --- a/deducer.py Sat Mar 11 23:42:48 2017 +0100
1.2 +++ b/deducer.py Sun Mar 12 17:46:28 2017 +0100
1.3 @@ -1631,9 +1631,7 @@
1.4
1.5 # Obtain attribute references for the access.
1.6
1.7 - attrs = []
1.8 - for _attrtype, object_type, attr in self.referenced_attrs[access_location]:
1.9 - attrs.append(attr)
1.10 + attrs = self.get_references_for_access(access_location)
1.11
1.12 # Separate the different attribute types.
1.13
1.14 @@ -1703,9 +1701,7 @@
1.15 attrname = attrnames and attrnames[0]
1.16
1.17 if attrname:
1.18 - attrs = []
1.19 - for attrtype, object_type, attr in self.referenced_attrs[access_location]:
1.20 - attrs.append(attr)
1.21 + attrs = self.get_references_for_access(access_location)
1.22 refs.update(attrs)
1.23
1.24 # Alias references a name, not an access.
1.25 @@ -1725,6 +1721,15 @@
1.26
1.27 self.referenced_objects[accessor_location] = refs
1.28
1.29 + def get_references_for_access(self, access_location):
1.30 +
1.31 + "Return the references identified for 'access_location'."
1.32 +
1.33 + attrs = []
1.34 + for attrtype, object_type, attr in self.referenced_attrs[access_location]:
1.35 + attrs.append(attr)
1.36 + return attrs
1.37 +
1.38 def get_initialised_name(self, access_location):
1.39
1.40 """