tail() silently returns empty result for negative n on sized iterables
tail() silently returns empty result for negative n on sized iterables: a task in repo2rlenv-swe-next (Harbor dataset). When calling tail() with a negative n value on a sized iterable (like a string or list), no error is raised — it just returns an empty iterator. However, when the same negative n…
The task
When calling `tail()` with a negative `n` value on a sized iterable (like a string or list), no error is raised — it just returns an empty iterator. However, when the same negative `n` is passed with a non-sized iterator, a `ValueError` is raised.
Part of FineEnvs/repo2rlenv-swe-next.