[IronPython] Type of an empty array

Sanghyeon Seo sanxiyn at gmail.com
Wed Aug 30 08:06:12 CEST 2006


Slicing an array to an empty array seems to lose type information.
(This is a corner case and not urgent or blocking.)

>>> from System import Array
>>> empty = Array[int]([])
>>> type(empty)
<type 'Array[int]'>
>>> one = Array[int]([0])
>>> type(one)
<type 'Array[int]'>
>>> type(one[:1])
<type 'Array[int]'>
>>> type(one[:0])
<type 'Array[object]'>

Seo Sanghyeon



More information about the Ironpython-users mailing list