def _auth_to_kv_pairs(auth_string):
 for item in _split_auth_string(auth_string):
  (k, v) = item.split('=', 1)
  if (v.startswith('"') and (len(v) > 1) and v.endswith('"')):
   v = v[1:(-1)]
  (yield (k, v))

def _auth_to_kv_pairs ( auth_string ) : for item in _split_auth_string ( auth_string ) : ( k , v ) = item . split ( '=' , 1 ) if ( v . startswith ( '"' ) and ( len ( v ) > 1 ) and v . endswith ( '"' ) ) : v = v [ 1 : ( - 1 ) ] ( yield ( k , v ) )
split a digest auth string into key .