HF RL Explorer

nth combination with replacement does not raise IndexError for out-of-bounds indices

nth combination with replacement does not raise IndexError for out-of-bounds indices: a task in repo2rlenv-swe-smith (Harbor dataset). mi.nth combination with replacement(iterable, r, index) is supposed to raise IndexError when index is out of range (either too negative or too large). However, it…

The task

`mi.nth_combination_with_replacement(iterable, r, index)` is supposed to raise `IndexError` when `index` is out of range (either too negative or too large). However, it silently returns a result instead of raising, making it impossible to detect invalid indices.

Part of FineEnvs/repo2rlenv-swe-smith.