def _list_to_dict(_list, key_type = str, num_values = 2): """ Get dictionary from a gsettings list key """ if sys.version_info.major == 2: _list = [unicode_str(x) for x in _list] # translate to unicode return unpack_name_value_list(_list, key_type=key_type, num_values = num_values)