[issue24551] byte conversion

Padmanabhan Tr report at bugs.python.org
Thu Jul 2 18:08:07 CEST 2015


New submission from Padmanabhan Tr:

I have copied below an execution sequence. What is the problem?

>>> x = 8240
>>> x.to_bytes(4,byteorder='big')
b'\x00\x00 0'
>>> int.from_bytes(b'\x00\x00 0',byteorder='big')
8240
>>> int.from_bytes(b'\x20\x30',byteorder='big')
8240
>>>

----------
components: +Demos and Tools

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


More information about the Python-bugs-list mailing list