Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
        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
Esempio n. 5
0
        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
Esempio n. 6
0
 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
Esempio n. 7
0
 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
Esempio n. 8
0
 def comma(self, key):
     value = self.__song.comma(key)
     value = decode_value(key, value)
     if self.__formatter:
         return self.__formatter(key, value)
     return value
Esempio n. 9
0
 def comma(self, key):
     value = self.__song.comma(key)
     value = decode_value(key, value)
     if self.__formatter:
         return self.__formatter(key, value)
     return value