[New-bugs-announce] [issue45164] int.to_bytes()

daniel capelle report at bugs.python.org
Fri Sep 10 07:45:38 EDT 2021


New submission from daniel capelle <daniel at etrics.de>:

for example check:
(6500).to_bytes(2, 'big')
result is:
b'\x19d'
but was expected to be:
b'\x1964'
since 
ord('d') is 100 = 0x64 there seems to be hex and char representation mixed up.

----------
messages: 401571
nosy: hypnoticum
priority: normal
severity: normal
status: open
title: int.to_bytes()
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45164>
_______________________________________


More information about the New-bugs-announce mailing list