[issue45164] int.to_bytes()
New submission from daniel capelle : 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 <https://bugs.python.org/issue45164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45164] int.to_bytes()
daniel capelle added the comment: for example check: (6500).to_bytes(2, 'big') result is: b'\x19d' but was expected to be: b'\x19\x64' since ord('d') is 100 = 0x64 there seems to be hex and char representation mixed up. -- ___ Python tracker <https://bugs.python.org/issue45164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45164] int.to_bytes()
daniel capelle added the comment: An ASCII representation is shown instead of the hexadecimal value, if there is any. I was not aware this is an intended behaviour. -- ___ Python tracker <https://bugs.python.org/issue45164> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com