Georg Brandl schrieb:
> While looking at documenting the dict view changes, I came across an
> inconsistency in how the dict views' set-like operations are implemented:
> with sets/frozensets, the operator versions only work if the other operand
> is a set/frozenset, while the dict view operators allow any iterable.
> 
> Do we care?

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...

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

_______________________________________________
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

Reply via email to