Hi Guido,
Ah yes Martin just pointed this out on the tracker. I think it would still
be worthwhile having the tohex method, if not just to counter the obscurity
of the binascii.hexlify function (but for other reasons too).
Also there's an issue with all the functions in binascii - they return
byt
On Sat, Aug 9, 2008 at 12:40 AM, Matt Giuca <[EMAIL PROTECTED]> wrote:
> I'm confused as to how you represent a bytes object in hexadecimal in Python
> 3. Of course in Python 2, you use str.encode('hex') to go to hex, and
> hexstr.decode('hex') to go from hex.
>
> In Python 3, they removed "hex" as
Well, whether there's community support for this or not, I thought I'd have
a go at implementing this, so I did. I've submitted a feature request +
working patch to the bug tracker:
http://bugs.python.org/issue3532
Matt
PS. I mean
''.join("%02x" % b for b in mybytes)
Hi,
I'm confused as to how you represent a bytes object in hexadecimal in Python
3. Of course in Python 2, you use str.encode('hex') to go to hex, and
hexstr.decode('hex') to go from hex.
In Python 3, they removed "hex" as a codec (which was a good move, I think).
Now there's the static method by