This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schuppenies
Recipients pitrou, schuppenies
Date 2009-05-11.02:08:30
SpamBayes Score 1.0971684e-06
Marked as misclassified No
Message-id <1242007713.71.0.74563445658.issue5964@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-05-11 02:08:33schuppeniessetrecipients: + schuppenies, pitrou
2009-05-11 02:08:33schuppeniessetmessageid: <1242007713.71.0.74563445658.issue5964@psf.upfronthosting.co.za>
2009-05-11 02:08:32schuppenieslinkissue5964 messages
2009-05-11 02:08:31schuppeniescreate