python3 binascii.hexlify ...

Cameron Simpson cs at
Sat Feb 9 11:44:33 CET 2013

This seems to return a bytes object in Python 3.3.0. I was expecting a
string. The documentation here:

also keeps me expecting a string. Am I missing something?


  [hg/css-venti-bytes+utf8]fleet*2> python3
  Python 3.3.0 (default, Nov 11 2012, 08:47:42) 
  [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))]
  on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import binascii
  >>> binascii.hexlify(b'abc')

I'm on a Mac but am hoping that is irrelevant.

Cameron Simpson <cs at>

You can fool too many of the people too much of the time. - James Thurber

More information about the Python-list mailing list