[New-bugs-announce] [issue3486] bytes.join does not accept a sequence of bytearrays

Antoine Pitrou report at bugs.python.org
Fri Aug 1 19:47:30 CEST 2008


New submission from Antoine Pitrou <pitrou at free.fr>:

This works in py3k but not in 2.x. I don't know if it is deliberate:

Python 3.0b2+ (py3k, Jul 27 2008, 12:52:40) 
[GCC 4.3.1 20080626 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> b"".join([bytearray(b"")])
b''

Python 2.6b2+ (trunk, Aug  1 2008, 01:47:52) 
[GCC 4.3.1 20080626 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> b"".join([bytearray(b"")])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: sequence item 0: expected string, bytearray found

----------
components: Interpreter Core
messages: 70573
nosy: pitrou
priority: normal
severity: normal
status: open
title: bytes.join does not accept a sequence of bytearrays
type: behavior
versions: Python 2.6

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


More information about the New-bugs-announce mailing list