[IronPython] List slicing in IPy 2

Glenn Jones glenn.k.jones+ipy at gmail.com
Wed Nov 19 17:10:24 CET 2008


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/c0e4a1c0/attachment.html>


More information about the Ironpython-users mailing list