[New-bugs-announce] [issue4348] bytearray methods returning self

Dino Viehland report at bugs.python.org
Tue Nov 18 22:29:15 CET 2008


New submission from Dino Viehland <dinov at microsoft.com>:

In 2.6 but not in 3.0 RC2:

x = bytearray(b'abc')
y = x.replace(b'abc', b'bar', 0)
id(x) == id(y)

In 2.6 and in 3.0 RC2:

t = bytearray()
for i in range(256): t.append(i)

x = bytearray(b'')
y = x.translate(t)
id(x) == id(y)

----------
messages: 76012
nosy: DinoV
severity: normal
status: open
title: bytearray methods returning self
type: behavior
versions: Python 2.6, Python 3.0

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


More information about the New-bugs-announce mailing list