Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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