def recentMatches(self, **criteria):
if not self.matches: return [] <EOL>try: <EOL><INDENT>maxMatches = criteria["<STR_LIT>"]<EOL>del criteria["<STR_LIT>"]<EOL><DEDENT>except AttributeError:<EOL><INDENT>maxMatches = c.RECENT_MATCHES<EOL><DEDENT>alLMatches = self.matchSubset(**criteria)<EOL>matchTimes = [(m.endTime, m) for m in matches]<EOL>selMatches = sorted(matchTimes)[:maxMatches] <EOL>retMatches = [m for endTime,m in selMatches] <EOL>return retMatches<EOL>
identify all recent matches for player given optional, additional criteria