On Thu, 6 Feb 2025 09:26:54 +0000 Donald Hunter wrote: > class Type(SpecAttr): > + starts_with_digit = re.compile(r"^\d") > + > def __init__(self, family, attr_set, attr, value): > super().__init__(family, attr_set, attr, value) > > @@ -74,6 +76,8 @@ class Type(SpecAttr): > self.c_name = c_lower(self.name) > if self.c_name in _C_KW: > self.c_name += '_' > + if self.starts_with_digit.match(self.c_name): > + self.c_name = '_' + self.c_name bit heavyweight with the regex? I think this would do: if self.c_name[0].isdigit(): but either way: Acked-by: Jakub Kicinski <kuba@xxxxxxxxxx>