def index_attributes(self, aa: CAttributes) -> int: args = [self.index_attribute(a) for a in aa.get_attributes()] def f(index: int, key: Tuple[str, str]) -> CAttributes: return CAttributes(self, index, aa.tags, args) return self.attributes_table.add(IT.get_key(aa.tags, aa.args), f)
def get_value(node: ET.Element) -> CAttributes: rep = IT.get_rep(node) args = (self,) + rep return CAttributes(*args)
def ia(attrs: CAttributes) -> List[int]: return [] if len(attrs.get_attributes()) == 0 else [self.index_attributes(attrs)]
def f(index: int, key: Tuple[str, str]) -> CAttributes: return CAttributes(self, index, aa.tags, args)