[New-bugs-announce] [issue27039] bytearray.remove cannot remove bytes with value greater than 127

Damien George report at bugs.python.org
Mon May 16 12:29:48 EDT 2016


New submission from Damien George:

The following code fails with a ValueError (but I expect it to succeed):

>>> bytearray([128]).remove(128)

Tested with Python 2.7.11 and 3.5.1.  Probably it's a case of comparing a char (signed byte) with an unsigned value.

----------
components: Interpreter Core
messages: 265709
nosy: Damien George
priority: normal
severity: normal
status: open
title: bytearray.remove cannot remove bytes with value greater than 127
type: behavior
versions: Python 2.7, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27039>
_______________________________________


More information about the New-bugs-announce mailing list