def filter_oauth_params(params):
 is_oauth = (lambda kv: kv[0].startswith(u'oauth_'))
 if isinstance(params, dict):
  return filter(is_oauth, params.items())
 else:
  return filter(is_oauth, params)

def filter_oauth_params ( params ) : is_oauth = ( lambda kv : kv [ 0 ] . startswith ( u'oauth_' ) ) if isinstance ( params , dict ) : return filter ( is_oauth , params . items ( ) ) else : return filter ( is_oauth , params )
removes all non oauth parameters from a dict or a list of params .