def __init__(self, hecke_char_group, x): ray_class_group = hecke_char_group.group() if not isinstance(x, (list,tuple)) or len(x) != ray_class_group.ngens(): x = ray_class_group(x).list() DualAbelianGroupElement.__init__(self, hecke_char_group, x) self.__repr = None self.__element_vector = x