string_to_tuple

glotaran.parse.util.string_to_tuple(tuple_str: str, from_list=False)Union[Tuple[float], Tuple[str], float, str][source]

[summary]

Parameters
  • tuple_str (str) – A string representing some tuple to convert the numbers inside the string tuple are mapped to float

  • from_list (bool, optional) – only if true will a single number string be converted to float, otherwise returned as-is since it may represent a label, by default False

Returns

Returns the tuple intended by the string

Return type

Union[Tuple[float], Tuple[str], float, str]