On Sun, Sep 9, 2012 at 11:44 PM, Token Type <typeto...@gmail.com> wrote:
>               lemma_set.add(synset.lemma_names)

That tries to add the whole list as a single object, which doesn't
work because lists can't go into sets. There are two solutions,
depending on what you want to do.

1) If you want each addition to remain discrete, make a tuple instead:
lemma_set.add(tuple(synset.lemma_names))

2) If you want to add the elements of that list individually into the
set, use update:
lemma_set.update(synset.lemma_names)

I'm thinking you probably want option 2 here.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to