def dict_with_str_keys(dct, encoding='utf-8'):
 return {force_str(key, encoding): value for (key, value) in six.iteritems(dct)}

def dict_with_str_keys ( dct , encoding = 'utf-8' ) : return { force_str ( key , encoding ) : value for ( key , value ) in six . iteritems ( dct ) }
applies force_str on the keys of a dict .