[IronPython] Trouble with 2.6 RC1
Dino Viehland
dinov at microsoft.com
Wed Oct 14 09:56:09 PDT 2009
Is the object in the set a user-defined object of some sort (or say a tuple of a user defined object)? And if there is a user defined object does it override __hash__ / __eq__ and in particular is __hash__ stable over time?
Also can you see what _items._hashFunc and _items._eqFunc are (in particular what the method is)?
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Glenn Jones
Sent: Wednesday, October 14, 2009 8:49 AM
To: users at lists.ironpython.com
Subject: [IronPython] Trouble with 2.6 RC1
Hi guys,
I have just run across a problem with sets and iteration. I haven't managed to make a repo that doesn't include most of our source, but a little investigation has shown that in SetIterator.Current, there is a test to see whether the current element is still in the enumerator (!_items.Contains(_enumerator.Current)). This is failing when I believe it shouldn't. I have thrown in some debugging code to compare the elements of _items against _enumerator.Current using == and that returns true for one of the elements when .Contains is returning False.
This is a blocker for us at Resolver because a workaround would require quite a lot of work.
Thanks
Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20091014/d1b00e0b/attachment-0001.htm>
More information about the Users
mailing list