The tail() function in more-itertools has an inconsistent behavior when given a negative n value. When…
The tail() function in more-itertools has an inconsistent behavior when given a negative n value. When…: a task in repo2rlenv-swe-gen (Harbor dataset). For example: - list(mi.tail(-1, iter('ABCDEFG'))) raises ValueError (correct) - list(mi.tail(-1, 'ABCDEFG')) returns instead of raising ValueError…
The task
For example: - `list(mi.tail(-1, iter('ABCDEFG')))` raises `ValueError` (correct) - `list(mi.tail(-1, 'ABCDEFG'))` returns `[]` instead of raising `ValueError` (incorrect)
Part of FineEnvs/repo2rlenv-swe-gen.