Matt Giuca <[EMAIL PROTECTED]> added the comment: > I recommend to use binascii.hexlify.
Ah, see I did not know about this! Thanks for pointing it out. * However, it is *very* obscure. I've been using Python for a year and I didn't know about it. * And, it requires importing binascii. * And, it results in a bytes object, not a str. That's weird. (Perhaps it would be good idea to change the functions in the binascii module to output strings instead of bytes? Ostensibly it looks like this module hasn't undergone py3kification). Would it hurt to have the tohex method of the bytes object to perform this task as well? It would be much nicer to use since it's a method of the object rather than having to find out about and import and use some function. Also why have a bytes.fromhex method when you could use binascii.unhexlify? (If it's better from a code standpoint, you could replace the code I wrote with a call to binascii.unhexlify). _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3532> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com