[IronPython] List slicing in IPy 2

Dino Viehland dinov at microsoft.com
Wed Nov 19 17:44:28 CET 2008


Thanks for the report.  We should be defining __index__ on the .NET primitive numeric types as well.  Filed as 19657 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=19657


From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Glenn Jones
Sent: Wednesday, November 19, 2008 8:10 AM
To: users at lists.ironpython.com
Subject: [IronPython] List slicing in IPy 2

Hi all,

Further discoveries from our update to use Ipy 2:
In Ipy1:
>>> from System import Int64
>>> i = Int64(3)
>>> range(1, 100)[i:20]
[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

in IPy2:
>>> from System import Int64
>>> i = Int64(5)
>>> range(1, 100)[i:20]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected index value, got Int64


It's not a major issue for us, but it's still a little strange.

Thanks
Glenn & Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081119/fbc03afe/attachment.html>


More information about the Ironpython-users mailing list