[issue10970] "string".encode('base64') is not the same as base64.b64encode("string")

Mahmoud Abdelkader report at bugs.python.org
Sat Jan 22 04:39:28 CET 2011


Mahmoud Abdelkader <mabdelkader at gmail.com> added the comment:

Thanks for the clarification Terry. This is indeed not a bug. For reference, the pieces of code I pasted line-wrapped after the 76th character, which was my main source of confusion.

After reading RFC3548, I am now informed that the behavior of string.encode is the correct and expected result, as the documentation per 7.8.3 state that it's MIME 64.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10970>
_______________________________________


More information about the Python-bugs-list mailing list