Message149876
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. |
|
Date |
User |
Action |
Args |
2011-12-19 16:30:45 | pitrou | set | recipients:
+ pitrou, vstinner |
2011-12-19 16:30:44 | pitrou | set | messageid: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> |
2011-12-19 16:30:44 | pitrou | link | issue13637 messages |
2011-12-19 16:30:44 | pitrou | create | |
|