Trouble with 2.6 RC1

View: New views
2 Messages — Rating Filter:   Alert me  

Trouble with 2.6 RC1

by Glenn Jones-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: Trouble with 2.6 RC1

by Dino Viehland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

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@... [mailto:users-bounces@...] On Behalf Of Glenn Jones
Sent: Wednesday, October 14, 2009 8:49 AM
To: users@...
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


_______________________________________________
Users mailing list
Users@...
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com