On 9/4/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Georg Brandl schrieb:
> Oh, and another thing: the items views can contain unhashable values, so > > d.items() & d.items() > > will fail for such dictionaries since the operands are converted to sets > before doing the intersection. > > I suspect there's nothing that can easily be done about that though... Py3k-ish: >>> d = {2: [], 4: {}} >>> d.items() & d.items() ... TypeError: list objects are unhashable Must behave like Python 2.x-ish: >>> d = {2: [], 4: {}} >>> set(d.items()) & set(d.items()) ... TypeError: list objects are unhashable .. right? If so, IIUC, there is nothing to be done about that... > Georg -- http://www.advogato.org/person/eopadoan/ Bookmarks: http://del.icio.us/edcrypt _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com