Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] PythonDictionary.Contains(KeyValuePair) doesn't check value

----------------------------------------------

ISSUES

1. [New issue] PythonDictionary.Contains(KeyValuePair) doesn't check value
http://ironpython.codeplex.com/workitem/33904
User rumzeus has proposed the issue:

"PythonDictionary implements ICollection<KeyValuePair<TKey,TValue>> which has a 
method bool Contains(KeyValuePair<TKey, TValue> kvp). The current 
implementation only checks if the key is contained.

In contrast the System.Collections.Generic.Dictionary<TKey, TValue> 
implementation checks both the key and the value.

Is this intentional?

There is already a ContainsKey(TKey key) method that can be used if the current 
behaviour is desired.

Tthe documentation says: "Implementations can vary in how they determine 
equality of objects". So I guess this is not strictly wrong. It seems quite 
surprising though.

http://msdn.microsoft.com/en-us/library/k5cf1d56.aspx";
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on 
CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue 
Tracker. You can unsubscribe or change your issue notification settings on 
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to