This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: bytearray_getitem() handles negative index incorrectly
Type: behavior Stage: resolved
Components: Interpreter Core Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, sir-sigurd, twouters
Priority: normal Keywords: patch

Created on 2019-08-13 11:50 by sir-sigurd, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15250 merged sir-sigurd, 2019-08-13 11:52
Messages (3)
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.
msg351522 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2019-09-09 16:28
New changeset 92709a263e9cec0bc646ccc1ea051fc528800d8d by T. Wouters (Sergey Fedoseev) in branch 'master':
bpo-37840: Fix handling of negative indices in bytearray_getitem() (GH-15250)
msg378376 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-10 10:32
This seems complete, can it be closed?
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82021
2020-10-21 15:12:25iritkatrielsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-10 10:32:07iritkatrielsetnosy: + iritkatriel
messages: + msg378376
2019-09-09 16:28:38twouterssetnosy: + twouters
messages: + msg351522
2019-08-13 11:52:43sir-sigurdsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14972
2019-08-13 11:50:02sir-sigurdcreate