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 <rep...@bugs.python.org> <http://bugs.python.org/issue24144> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com