Message87560
Here is a patch which will return False instead of TypeError. This is
the same behavior a normal set has. Two things though.
1. I don't know wether the 'import _abcoll' statement somehow influences
the bootstrap in one way or the other, because 'from _abcoll import
Iterable' does.
2. The current WeakSet implementation returns True if a WeakSet is
compared to any Iterable which contains the same set of objects:
>>> import weakref
>>>
>>> class Foo: pass
...
>>> l = [Foo(), Foo(), Foo()]
>>> ws = weakref.WeakSet(l)
>>> ws == l
True
Not sure wether this is intended, since this is not the same behavior of
a normal set. If it is intended, I think it should be documented. |
|
Date |
User |
Action |
Args |
2009-05-11 02:08:33 | schuppenies | set | recipients:
+ schuppenies, pitrou |
2009-05-11 02:08:33 | schuppenies | set | messageid: <1242007713.71.0.74563445658.issue5964@psf.upfronthosting.co.za> |
2009-05-11 02:08:32 | schuppenies | link | issue5964 messages |
2009-05-11 02:08:31 | schuppenies | create | |
|