This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou, vstinner
Date 2011-12-19.16:30:44
SpamBayes Score 1.6328867e-06
Marked as misclassified No
Message-id <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za>
In-reply-to
Content
a2b_hex and friends accept only byte strings:

>>> binascii.a2b_hex(b'00')
b'\x00'
>>> binascii.a2b_hex('00')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' does not support the buffer interface

But they could just as well accept ASCII-only unicode strings. Also, with PEP 393, accessing the 8-bit ASCII data doesn't even need a conversion.
History
Date User Action Args
2011-12-19 16:30:45pitrousetrecipients: + pitrou, vstinner
2011-12-19 16:30:44pitrousetmessageid: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za>
2011-12-19 16:30:44pitroulinkissue13637 messages
2011-12-19 16:30:44pitroucreate