How to recover bytes function?
python at mrabarnett.plus.com
Fri Nov 14 00:12:01 CET 2014
On 2014-11-13 22:32, satishmlmlml at gmail.com wrote:
> file = open('data.bin', 'rb')
> bytes = file.read()
> records = [bytes([char] * 8) for char in b'spam']
> TypeError: 'bytes' object is not callable
> How to recover bytes function?
The simple answer:
bytes = __builtins__.bytes
The smart answer:
Don't bind to 'bytes' in the first place!
More information about the Python-list