def __lt__(self, other): if type(self) != type(other): return type_sort(type(self)) < type_sort(type(other)) n1 = utils.natural_sort_key(self.name) n2 = utils.natural_sort_key(other.name) return n1 < n2
def print_trailer(self): succ = self.cfg.succ(self.addr) exits = [(self.cfg.edge(self.addr, x).get("cond"), x) for x in succ] print("Exits:", sorted(exits, key=lambda x: utils.natural_sort_key(str(x))), file=self.stream)