def matchSubset(**kwargs):
ret = []<EOL>for m in self.matches:<EOL><INDENT>allMatched = True<EOL>for k,v in iteritems(kwargs):<EOL><INDENT>mVal = getattr(m, k)<EOL>try:<EOL><INDENT>if v == mVal or v in mVal: continue <EOL><DEDENT>except Exception: pass <EOL>allMatched = False<EOL>break<EOL><DEDENT>if allMatched: ret.append(m)<EOL><DEDENT>return ret<EOL>
extract matches from player's entire match history given matching criteria kwargs