9194f6d3adb051b5a1cb34dfd39d14de1d826442
sorted_last_index returns 0 for an empty array (and for any value smaller than every element), so index becomes -1. The guard only bounded index from above, so array[-1] was evaluated on an empty list and raised IndexError. Add the lower-bound check so a negative index is reported as not found, matching sorted_index_of.
Description
My contributions to dgilland/pydash: 4 commits, 1 merged PRs
158 KiB
0 Stars
1 Watchers
0 Forks
Languages
Python
100%