Yes, absolutely


On Mon, Mar 24, 2014 at 9:23 AM, Jorge Cañardo Alastuey <
notifications@github.com> wrote:

> In skbio/core/tree.py:
>
> > +
> > +        Notes
> > +        -----
> > +        This method returns the name of the node and a count of tips and the
> > +        number of internal nodes in the tree
> > +
> > +        Examples
> > +        --------
> > +        >>> from skbio.core.tree import TreeNode
> > +        >>> tree = TreeNode.from_newick("((a,b)c, d)root;")
> > +        >>> repr(tree)
> > +        '<TreeNode, name: root internal node count: 1, tips count: 3>'
> > +
> > +        """
> > +        nodes = [n for n in self.traverse(include_self=False)]
> > +        n_tips = sum([n.is_tip() for n in nodes])
>
> I was referring to feeding a list to sum (in this case, more instances can
> be found searching for ([) instead of a generator.
>
> Re. the nodes list that you brought up, I think code is clear as is.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/192/files#r10889057>
> .
>