Both cases are an index error. It's just for some other reasons in case of the section, the error is represented by an empty object and it's left to user to handle the result.
This could easily conceal the indexing error unless the caller code explicitly checks the length of the returned section.
> This could easily conceal the indexing error unless the caller code explicitly checks the length of the returned section.
An empty returned section doesn’t mean the index was out of bounds (`a[0:0]`); if you want to make sure you have to check the length before slicing, like in Go.
This could easily conceal the indexing error unless the caller code explicitly checks the length of the returned section.