@classmethod
def stringToValue(cls, string, dtype):
    """
        Returns a representation of ``string`` as value of given ``dtype``.
        If ``string`` represents a list of values in curly brackets (e.g. ``{1, 2, 3}``),
        a list of values is returned.
        """
    string.strip()
    if string.startswith('{') and string.endswith('}'):
        value = cls._stringToList(string, dtype)
    else:
        value = dtype(string)
    return value
