def comma(self, key): value = self.__song.comma(key) if isinstance(value, (int, float)): value = decode_value(key, value) if self.__formatter: return self.__formatter(key, value) return value
def comma(self, key): value = self.__song.comma(key) if isinstance(value, number_types): value = decode_value(key, value) if self.__formatter: return self.__formatter(key, value) return value
def list_separate(self, key): if key.startswith("~#") and "~" not in key[2:]: value = self.__song(key) value = decode_value(key, value) values = [value] else: values = self.__song.list_separate(key) if self.__formatter: return [self.__formatter(key, v) for v in values] return values
def list_separate(self, key): if key.startswith("~#") and "~" not in key[2:]: value = self.__song(key) value = decode_value(key, value) values = [value] else: values = self.__song.list_separate(key) if self.__formatter: return [((self.__formatter(key, v[0]), self.__formatter(key, v[1])) if isinstance(v, tuple) else self.__formatter(key, v)) for v in values] return values
def comma(self, key): value = self.__song.comma(key) value = decode_value(key, value) if self.__formatter: return self.__formatter(key, value) return value