[issue24551] byte conversion

Steven D'Aprano report at bugs.python.org
Thu Jul 2 18:50:40 CEST 2015


Steven D'Aprano added the comment:

I don't know, what *is* the problem? What behaviour did you expect? The code sample you show seems to be working exactly as it is supposed to.

b'\x00\x00 0' is the same as b'\x00\x00\x20\x30', and that is the same as b'\x20\x30' with NUL padding on the left. Written as integers, that is like 0x00002030 == 0x2030 == 8240.

I don't think this demonstrates a bug or problem. If you still believe it does, please re-open the issue with a detailed description of what behaviour you expected and why you think this is a bug.

----------
nosy: +steven.daprano
resolution:  -> not a bug
status: open -> closed

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


More information about the Python-bugs-list mailing list