#NEWLINE# def expand_actions( self , actions ) : #NEWLINE# #INDENT# 'Accepts an array of actions and returns an array of actions which match.\n        This should be called before "matches?" and other checking methods since they\n        rely on the actions to be expanded.' #NEWLINE# results = list ( ) #NEWLINE# for action in actions : #NEWLINE# #INDENT# if ( action in self . aliased_actions ) : #NEWLINE# #INDENT# results . append ( action ) #NEWLINE# for item in self . expand_actions ( self . aliased_actions [ action ] ) : #NEWLINE# #INDENT# results . append ( item ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# results . append ( action ) #NEWLINE# #UNINDENT# #UNINDENT# return results