Removes duplicates
On Apr 21, 2014 7:56 PM, "adamrp" <notifications@github.com> wrote:

> In americangut/phyla_plots.py:
>
> > +    Tables are filtered to the respective category value, dropping all samples
> > +    that do not hold the category value. The tables and the order of the
> > +    category values is returned.
> > +
> > +    Parameters
> > +    ----------
> > +
> > +    table : Table, the table to operate on
> > +    cat : str, the category to operate on
> > +
> > +    Returns
> > +    -------
> > +    tuple : (tables, values) where tables is a list of Table and values is
> > +        a list of str
> > +    """
> > +    values = sorted({md[cat] for md in table.SampleMetadata})
>
> Just curious about the set notation here; is there a reason not to use
> typical list comprehension? What is the effect of sorting a set?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/biocore/American-Gut/pull/86/files#r11835544>
> .
>