How to recover bytes function?

Chris Angelico rosuav at gmail.com
Thu Nov 13 18:14:36 EST 2014


On Fri, Nov 14, 2014 at 9:32 AM,  <satishmlmlml at gmail.com> wrote:
> file = open('data.bin', 'rb')
> bytes = file.read()
> bytes
> b'\x00\x00\x00\x02spam\x00\x03?\x9d\xf3\xb6'
> records = [bytes([char] * 8) for char in b'spam']
> TypeError: 'bytes' object is not callable
>
> How to recover bytes function?

del bytes

ChrisA



More information about the Python-list mailing list