[Python-3000] bytearray incompatible with bytes
Aahz
aahz at pythoncraft.com
Fri Aug 29 15:40:01 CEST 2008
On Fri, Aug 29, 2008, Pyry Pakkanen wrote:
>
> It runs fine in 2.5 but in 3.0b3 it gives the following exception:
> Traceback (most recent call last):
> File "myscripts/ossthrough.py", line 5, in <module>
> dev.write(dev.read(1024))
> TypeError: write() argument 1 must be bytes or read-only buffer, not bytearray
>
> This looks like a bug. I thought bytearray is a read-only buffer.
>
> Looking at the ossaudiodev.c source it seems that
> PyArg_ParseTuple(args, "y#:write", &cp, &size) doesn't accept
> bytearrays.
Please file a report on bugs.python.org -- that's the only way we have to
track things.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Adopt A Process -- stop killing all your children!
More information about the Python-3000
mailing list