Top and Bottom Values [PEP: 326]
Sion Arrowsmith
siona at chiark.greenend.org.uk
Wed Sep 27 10:09:17 EDT 2006
Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
>In message <slrnehk7ju.rcu.apardon at rcpc42.vub.ac.be>, Antoon Pardon wrote:
>> I need this Top value in
>> a context where it can be used as a start or stop value
>> in a slice.
>But the only valid values allowed for indices are 0
>>> range(5)[:-1]
[0, 1, 2, 3]
> up to the length of the
>array inclusive. Larger integers are not allowed, [ ... ]
>>> range(5)[:sys.maxint]
[0, 1, 2, 3, 4]
--
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
More information about the Python-list
mailing list