4 ms·
> the fact that ranges include both endpoints - rather than being half-open as in Python - is another such indication No, it's the same indication, twice. Onc
by marvy 8y ago
> the fact that ranges include both endpoints - rather than being half-open as in Python - is another such indication
No, it's the same indication, twice. Once you've decided on 1-based, you almost definitely want to include both endpoints. Else you end up saying things like a[1:n+1] to indicate "the whole array please", which is annoying.