def findLinksRel(link_attrs_list, target_rel):
 matchesTarget = (lambda attrs: linkHasRel(attrs, target_rel))
 return filter(matchesTarget, link_attrs_list)

def findLinksRel ( link_attrs_list , target_rel ) : matchesTarget = ( lambda attrs : linkHasRel ( attrs , target_rel ) ) return filter ( matchesTarget , link_attrs_list )
filter the list of link attributes on whether it has target_rel as a relationship .