#NEWLINE# def can( self , action , subject ) : #NEWLINE# #INDENT# matches = [ rule for rule in self . relevant_rules_for_match ( action , subject ) if rule . matches_conditions ( action , subject ) ] #NEWLINE# if matches : #NEWLINE# #INDENT# match = matches [ 0 ] #NEWLINE# return match . base_behavior #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False