[IronPython] int64/long incompatibility in dictionary lookup

Dino Viehland dinov at exchange.microsoft.com
Tue Aug 12 22:34:57 CEST 2008


I don't think it's a known issue - but it's because we don't have code that unifies the Int64's hashing w/ long's hashing though.  We should probably add that for a smoother .NET interop story.

I've filed this as CodePlex bug #17799 (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=17799).  Thanks for the report.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ronnie Maor
Sent: Tuesday, August 12, 2008 1:10 PM
To: Discussion of IronPython
Subject: [IronPython] int64/long incompatibility in dictionary lookup

Hi all,

is the following a known issue?

>>> x = System.Int64(8591464408876390743)
>>> y = long(x)
>>> x == y
True
>>> d = {x:3}
>>> d[x]
3
>>> d[y]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 8591464408876390743

happens in both IPy 1.1.2 and 2.0b4

thanks
Ronnie

________________________________
Sample disclaimer text
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080812/e81c9c6a/attachment.html>


More information about the Ironpython-users mailing list