def append(self, item):
if isinstance(item, Composite):<EOL><INDENT>self._content += item.get_content()<EOL><DEDENT>elif isinstance(item, list):<EOL><INDENT>self._content += item<EOL><DEDENT>elif isinstance(item, dict):<EOL><INDENT>self._content.append(item)<EOL><DEDENT>elif isinstance(item, basestring):<EOL><INDENT>self._content.append({"<STR_LIT>": item})<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise Exception(msg.format(item))<EOL><DEDENT>
Add an item to the Composite.  Item can be a Composite, list etc