The Bits. getitem method in boltons/mathutils.py has a bug where negative integer indices always return…
The Bits. getitem method in boltons/mathutils.py has a bug where negative integer indices always return…: a task in repo2rlenv-swe-gen (Harbor dataset). For example: python from boltons.mathutils import Bits b = Bits('1011') b 3 returns True (correct) b -1 returns False (WRONG — should return…
The task
For example: ```python from boltons.mathutils import Bits b = Bits('1011') b[3] # returns True (correct) b[-1] # returns False (WRONG — should return True, same bit as b[3]) b[-2] # returns False (WRONG — should return True) b[-99] # returns False (WRONG — should raise IndexError) ```
Part of FineEnvs/repo2rlenv-swe-gen.