[docs] [issue24144] Docs discourage use of binascii.unhexlify etc.
R. David Murray
report at bugs.python.org
Fri May 8 00:51:21 CEST 2015
R. David Murray added the comment:
No, actually, using codecs would be the most straightforward way to achieve portability. The usual way to get hex in python2 was encode('hex'), which uses the codec. But if you want to use hexlify instead, I don't see any reason not to. There's no reason to change the binascii module description, though, since it is talking about normal code, not 2/3 shared source code (where you do sometimes have to jump through somewhat awkward hoops).
(The One Obvious Way starting with 3.5 will be b'abcde'.hex(), but of course that isn't python2 compatible.)
----------
nosy: +r.david.murray
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24144>
_______________________________________
More information about the docs
mailing list