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.

classification
Title: bytearray.pop() returns negative ints
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hagen, mark.dickinson
Priority: normal Keywords: patch

Created on 2009-09-05 18:51 by hagen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bytearray.patch hagen, 2009-09-05 18:53
Messages (2)
msg92292 - (view) Author: Hagen Fürstenau (hagen) Date: 2009-09-05 18:51
This looks pretty bad:

>>> b = bytearray(b"\xff")
>>> b[0]
255
>>> b.pop()
-1

Fortunately it's easy too fix (attached).
msg92299 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-09-06 10:21
Fixed in r74673 (trunk), r74674 (release26-maint), r74675 (py3k)
and r74676 (release31-maint).  Thanks!
History
Date User Action Args
2022-04-11 14:56:52adminsetgithub: 51095
2009-09-06 10:21:06mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg92299

resolution: fixed
stage: resolved
2009-09-05 18:53:07hagensetfiles: + bytearray.patch
keywords: + patch
2009-09-05 18:51:54hagencreate