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

2011-01-21 Thread Mahmoud Abdelkader
Mahmoud Abdelkader 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

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

2011-01-20 Thread Mahmoud Abdelkader
New submission from Mahmoud Abdelkader : Given a string, encoding it with .encode('base64') is not the same as using base64's b64encode function. I think this is very unclear and unintuitive. Here's some example code to demonstrate the problem. Before I attempt to subm