[issue45164] int.to_bytes()
Serhiy Storchaka
report at bugs.python.org
Fri Sep 10 07:53:14 EDT 2021
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
b'\x1964' is a 3-bytes bytes object.
>>> b = b'\x1964'
>>> len(b)
3
>>> b[0], b[1], b[2]
(25, 54, 52)
What you what to get is b'\x19\x64'. And it is a different writing of b'\x19d', because b'\x64' is the same as b'd'.
>>> b'\x19\x64'
b'\x19d'
----------
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45164>
_______________________________________
More information about the Python-bugs-list
mailing list