From: R David Murray Date: Sun, 13 Dec 2015 23:11:07 +0000 (-0500) Subject: Merge: #25495: Clarify b2a_base64 documentation vis 57 bytes. X-Git-Tag: v3.6.0a1~916 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d991963a9d7d2cab962bd5fe7bdf6eeff903ed8a;p=python Merge: #25495: Clarify b2a_base64 documentation vis 57 bytes. In 3.6 the parameter to control the appending of the newline was finally added, so I dropped the historical note about why a new line was always appended. --- d991963a9d7d2cab962bd5fe7bdf6eeff903ed8a diff --cc Doc/library/binascii.rst index 0cd18b1740,ff2bddaf9d..632ecf7f0f --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@@ -52,16 -52,13 +52,14 @@@ The :mod:`binascii` module defines the than one line may be passed at a time. -.. function:: b2a_base64(data) +.. function:: b2a_base64(data, \*, newline=True) Convert binary data to a line of ASCII characters in base64 coding. The return - value is the converted line, including a newline char. The newline is - added because the original use case for this function was to feed it a - series of 57 byte input lines to get output lines that conform to the - MIME-base64 standard. Otherwise the output conforms to :rfc:`3548`. + value is the converted line, including a newline char if *newline* is - true. The length of *data* should be at most 57 to adhere to the - base64 standard. - ++ true. The output of this function conforms to :rfc:`3548`. + + .. versionchanged:: 3.6 + Added the *newline* parameter. .. function:: a2b_qp(data, header=False)