Open
Description
Python 2 with future
:
>>> from builtins import bytes, str
>>> bytes.fromhex(str('aa'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "venv/lib/python2.7/site-packages/future/types/newbytes.py", line 212, in fromhex
return cls(string.replace(' ', '').decode('hex'))
File "venv/lib/python2.7/site-packages/future/types/newstr.py", line 334, in __getattribute__
raise AttributeError("decode method has been disabled in newstr")
AttributeError: decode method has been disabled in newstr
Python 3:
>>> bytes.fromhex(str('aa'))
b'\xaa'