attrs is used to store attributes from the YAML file. Changed from a defaultdict to a dict to avoid creating entries when querying the dictionary (attrs["rank"] to attrs.get("rank")). Assign values in metaattrs from attrs. metaattrs also contains computed attributes based on the declarations. For example, vector implies rank(1).
There are cases where it is necessary to know what was in the YAML file and the defaultdict was causing misleading entries.
attrs
is used to store attributes from the YAML file. Changed from a defaultdict to a dict to avoid creating entries when querying the dictionary (attrs["rank"]
toattrs.get("rank")
). Assign values inmetaattrs
fromattrs
.metaattrs
also contains computed attributes based on the declarations. For example,vector
impliesrank(1)
. There are cases where it is necessary to know what was in the YAML file and the defaultdict was causing misleading entries.