def get_action_descriptions(self, action_name=None):
descriptions = []<EOL>if action_name is None:<EOL><INDENT>for name in self.actions:<EOL><INDENT>for action in self.actions[name]:<EOL><INDENT>descriptions.append(action.as_action_description())<EOL><DEDENT><DEDENT><DEDENT>elif action_name in self.actions:<EOL><INDENT>for action in self.actions[action_name]:<EOL><INDENT>descriptions.append(action.as_action_description())<EOL><DEDENT><DEDENT>return descriptions<EOL>
Get the thing's actions as an array.

action_name -- Optional action name to get descriptions for

Returns the action descriptions.