# HG changeset patch # User Paul Boddie # Date 1476196044 -7200 # Node ID 068688ccb8187dbe6a69ab2ac3be3da35c8ff8b9 # Parent c7ddfc4525dae5f2da99e41803955d72631494d1 Modified and made use of the get_attrname_from_location function, also tidying the deducer and adding documentation. diff -r c7ddfc4525da -r 068688ccb818 common.py --- a/common.py Sat Oct 08 00:43:13 2016 +0200 +++ b/common.py Tue Oct 11 16:27:24 2016 +0200 @@ -800,6 +800,8 @@ """ path, name, attrnames, access = location + if not attrnames: + return attrnames return get_attrnames(attrnames)[0] def get_name_path(path, name): diff -r c7ddfc4525da -r 068688ccb818 deducer.py --- a/deducer.py Sat Oct 08 00:43:13 2016 +0200 +++ b/deducer.py Tue Oct 11 16:27:24 2016 +0200 @@ -384,7 +384,13 @@ def write_access_plans(self): - "Each attribute access is written out as a plan." + """ + Each attribute access is written out as a plan of the following form: + + location " " name " " test " " test type " " base " " traversed attributes + " " attributes to traverse " " context " " access method + " " static attribute + """ f_attrs = open(join(self.output, "attribute_plans"), "w") @@ -1339,12 +1345,10 @@ 'accessor_locations'. """ - path, name, attrnames, version = access_location - if not attrnames: + attrname = get_attrname_from_location(access_location) + if not attrname: return - attrname = get_attrnames(attrnames)[0] - # Collect all suggested types for the accessors. Accesses may # require accessors from of a subset of the complete set of types.