You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fails when start or end point outside the bounds of self
Since slice isn't inclusive, this isn't exactly true. With end == len, end definitely points outside the bounds of self (in the sense that you couldn't do v.get(end), which seems like the obvious interpretation), yet .slice will not fail.
A straightforward reading of the documentation for slice seems to suggest it is inclusive. Maybe write
Returns a slice of self from start up to, but not including, end.
or
Returns a slice of self spanning the interval [start, end).
Or something else (since both of these are kinda awkward and don't fix the next sentence).
I feel like slice's documentation should make the semantics of the method as clear and unambiguous as possible.
The text was updated successfully, but these errors were encountered:
In:
The documentation states
Since slice isn't inclusive, this isn't exactly true. With end == len, end definitely points outside the bounds of self (in the sense that you couldn't do v.get(end), which seems like the obvious interpretation), yet .slice will not fail.
A straightforward reading of the documentation for slice seems to suggest it is inclusive. Maybe write
or
I feel like slice's documentation should make the semantics of the method as clear and unambiguous as possible.
The text was updated successfully, but these errors were encountered: