On Tue, Mar 8, 2016 at 11:22 AM, BartC <b...@freeuk.com> wrote:
>
> (Is a byte string the same as a byte array? Is a byte array the same as an
> array.array? If I remove this line from my code, where 'data' has just been
> read from a file:
>
>    data=array.array('B',data)
>
> then it still works - Python 3. But not on Python 2. If I do .read on a
> binary file I get a byte string in Python 3, but a string in Python 2. That
> sort of mess.

The default string in Py2 *is* a byte string.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to