[Python-bugs-list] [ python-Bugs-547037 ] base64 newlines - documentation (again)

noreply@sourceforge.net noreply@sourceforge.net
Mon, 22 Apr 2002 04:41:16 -0700


Bugs item #547037, was opened at 2002-04-22 11:41
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=547037&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Paul Rouse (p_rouse)
Assigned to: Nobody/Anonymous (nobody)
Summary: base64 newlines - documentation (again)

Initial Comment:
The documentation fix for bug 463330, describing the
newline added by base64.encode and base64.encodestring
appears to be incorrect!

The "courtesy newline" is appended to the result, not
the input (at line 466 of binsacii.c), so it is *not*
true that

base64.encodestring('hello') ==
base64.encodestring('hello\n')

In fact:

   base64.encodestring('hello') == 'aGVsbG8=\n'
   base64.encodestring('hello\n') == 'aGVsbG8K\n'

This applies to documentation for 2.2 and 2.2.1, and
actual behaviour has been checked in 2.2 

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=547037&group_id=5470