"More About Unicode in Python 2 and 3"

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jan 6 15:47:11 EST 2014


On 06/01/2014 20:42, Tim Chase wrote:
> On 2014-01-06 22:20, Serhiy Storchaka wrote:
>>>>>> data = b"\x43\x6c\x67\x75\x62\x61" # is there an easier way to
>>>>>> turn a hex dump into a bytes literal?
>>
>>   >>> bytes.fromhex('43 6c 67 75 62 61')
>> b'Clguba'
>
> Very nice new functionality in Py3k, but 2.x doesn't seem to have such
> a method. :-(
>
> -tkc
>

Seems like another mistake, that'll have to be regressed to make sure 
there is Python 2 and Python 3 compatibility, which can then be 
reintroduced into Python 2.8 so that it gets back into Python 3.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list