If I run this:

    import lucene
    import types

    arr = lucene.JArray(types.IntType)([1, 2, 3, 4])

it makes a length 4 int array, initialized with 1, 2, 3, 4.

But then if I try to slice this array like this:

    print arr[0:]

it prints:

    [1, 2, 3]

but I think it should print:

    [1, 2, 3, 4]

ie, it's losing the last element.

If instead I slice with an explicit end index (arr[0:4]), it works correctly...

Any ideas?

Mike McCandless

http://blog.mikemccandless.com

Reply via email to