Message7584

Author irmen
Recipients irmen
Date 2013-01-20.14:33:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358692430.18.0.978719369694.issue2011@psf.upfronthosting.co.za>
In-reply-to
Content
binascii doesn't work with bytearray and memoryview types:

>>> import binascii
>>>
>>> binascii.b2a_base64(bytearray(b"hello"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: b2a_base64(): 1st arg can't be coerced to String
>>>
>>> binascii.b2a_base64(memoryview(b"hello"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: b2a_base64(): 1st arg can't be coerced to String
>>>


The above does work correctly in cPython 2.7
History
Date User Action Args
2013-01-20 14:33:50irmensetrecipients: + irmen
2013-01-20 14:33:50irmensetmessageid: <1358692430.18.0.978719369694.issue2011@psf.upfronthosting.co.za>
2013-01-20 14:33:48irmenlinkissue2011 messages
2013-01-20 14:33:47irmencreate