classification
Title: bytearray_getitem() handles negative index incorrectly
Type: behavior Stage: patch review
Components: Interpreter Core Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: sir-sigurd
Priority: normal Keywords: patch

Created on 2019-08-13 11:50 by sir-sigurd, last changed 2019-08-13 11:52 by sir-sigurd.

Pull Requests
URL Status Linked Edit
PR 15250 open sir-sigurd, 2019-08-13 11:52
Messages (1)
msg349545 - (view) Author: Sergey Fedoseev (sir-sigurd) * Date: 2019-08-13 11:50
bytearray_getitem() adjusts negative index, though that's already done by PySequence_GetItem().
This makes PySequence_GetItem(bytearray(1), -2) to return 0 instead of raise IndexError.
History
Date User Action Args
2019-08-13 11:52:43sir-sigurdsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14972
2019-08-13 11:50:02sir-sigurdcreate