That's a totally different issue. The result of .items() is a set. But if it contains an unhashable object you can't convert it to a regular set.
--Guido On 7/27/07, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > It seems the same applies to dict.items() ... > > $ set(dict(a=[]).items()) > >>> set(dict(a=[]).items()) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: unhashable type: 'list' > > > On 7/27/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 7/27/07, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > > > Why the docstrings for 'dict.values' says "a set-like object ..." ?? > > > > > > >>> list(dict(a=1,b=1,c=1).values()) > > > [1, 1, 1] > > > > Oops, that's a bug! Thanks for reporting. > > -- > Lisandro DalcĂn > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
