def expandDescendants(self, branches=None):
branches = branches or self.branches<EOL>return sum([b.descendants for b in branches], []) +[b.source for b in branches]<EOL>
Expand descendants from list of branches
:param list branches: list of immediate children as TreeOfContents objs
:return: list of all descendants

>>> toc = TOC.fromLatex(r'\section{h1}\subsection{subh1}\section{h2}\
... \subsection{subh2}')
>>> len(list(toc.source.descendants))
9
>>> len(toc.descendants)
9