[New-bugs-announce] [issue20279] bytearray.fromhex does not work with some hexes generated by hex

Anatoly Belikov report at bugs.python.org
Thu Jan 16 12:33:15 CET 2014


New submission from Anatoly Belikov:

bytearray.fromhex(hex(434)[2:]) 

throws ValueError: non-hexadecimal number found in fromhex() arg at position 2

Strangely it works with leading zero:

bytearray.fromhex('0' + hex(438)[2:])

----------
components: Library (Lib)
messages: 208273
nosy: Anatoly Belikov
priority: normal
severity: normal
status: open
title: bytearray.fromhex does not work with some hexes generated by hex
type: behavior
versions: Python 3.3

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


More information about the New-bugs-announce mailing list