lo
and hi
must satisfy 0 <= lo
<= hi
<= length; for slices, the upper bound is the capacity rather than the length."
On 17 Mar 2013 05:07, <david....@gmail.com> wrote:
>
> 2 responses to a 4 year stale thread at 5am on a weekend... impressive, thanks!
>
> Remy, it took me a while to understand what you were saying (which may have been proving your point). I think you're incorrect though
>
> python:
> s, i = range(10), 3
> print len(s[i:]) == len(s) - i # prints: True
>
> go:
> s, i := make([]int, 10), 3
> for j := range s {
> s[j] = j
> }
> fmt.Println(len(s[i:]) == len(s) - i) //prints: true
>
Try with i=-3. If you don't like to say it is false, let's say it is not true.
Rémy.