HF RL Explorer

tail() does not raise ValueError for negative n with sized iterables

tail() does not raise ValueError for negative n with sized iterables: a task in Repo2RLEnv R2E-Gym / SWEGEN (Harbor dataset). The tail() function from more itertools does not raise a ValueError when called with a negative n argument on a sized iterable (e.g., a string or list). Instead, it…

The task

The `tail()` function from `more_itertools` does not raise a `ValueError` when called with a negative `n` argument on a sized iterable (e.g., a string or list). Instead, it silently returns a result, which is unexpected behavior.

Part of FineEnvs/repo2rlenv-r2e-gym.