I'd like to encode a string in base64, but I found a inconsistent of two methods:
>>> 'aaa'.encode('base64')
'YWFh\n'
>>> import base64
>>> base64.b64encode('aaa')
'YWFh'
>>>
as you can see, the result of
'aaa'.encode('base64')
has a '\n' at the end, but the other method doesn't.
Why the inconsistent?
Thanks.
--
Best Regards,
Leo Jay
--
http://mail.python.org/mailman/listinfo/python-list
