Python Slice Questions


1. why does

a[:]

call a.__getitem__ with an argument:

slice(0, 2147483647, None)

instead of

slice(None, None, None)

2. where are slice lists, like:

a[1,2,3]

documented? The only place I've found is the language reference but the semantics are not explained there. Does this feature exist purely for Numeric Python?

UPDATE: slice lists have existed since 1.4 it appears.

The original post was in the category: python but I'm still in the process of migrating categories over.

The original post had 6 comments I'm in the process of migrating over.