self.as_element = element self.allowed_types = allowed_types self.attrs = None self.associations_name = {} self.associations_type = {} self.associations_optional = {} self.associations_delete = {} self.destroy() i = 0 while 1: attr_name = "attr%i" % i if attr_name not in self.associations_name: return attr_name else: i += 1