[Python-Dev] Extending hex() and oct() to accept strings
Bob Halley
halley at play-bow.org
Thu Aug 28 07:30:09 EDT 2003
More information about the Python-Dev mailing list
Thu Aug 28 07:30:09 EDT 2003
- Previous message: [Python-Dev] Extending hex() and oct() to accept strings
- Next message: [Python-Dev] Extending hex() and oct() to accept strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum <guido at python.org> writes: > And I think that what you really wanted is probably closer to this: > > >>> import binascii > >>> binascii.hexlify('ABC') > '414243' > >>> Or >>> 'ABC'.encode('hex_codec') '414243' >>> '414243'.decode('hex_codec') 'ABC' /Bob
- Previous message: [Python-Dev] Extending hex() and oct() to accept strings
- Next message: [Python-Dev] Extending hex() and oct() to accept strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list