Skip to content

Commit 46c6a25

Browse files
Address review comments (signature, docstrings).
1 parent e429f03 commit 46c6a25

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Doc/library/base64.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The :rfc:`4648` encodings are suitable for encoding binary data so that it can b
5151
safely sent by email, used as parts of URLs, or included as part of an HTTP
5252
POST request.
5353

54-
.. function:: b64encode(s, altchars=None)
54+
.. function:: b64encode(s, altchars=None, *, wrapcol=0)
5555

5656
Encode the :term:`bytes-like object` *s* using Base64 and return the encoded
5757
:class:`bytes`.

Lib/base64.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def b64encode(s, altchars=None, *, wrapcol=0):
5353
application to e.g. generate url or filesystem safe Base64 strings.
5454
5555
If wrapcol is non-zero, the output will be represented in lines of
56-
no more than wrapcol characters each, separated by a newline character.
56+
no more than wrapcol characters each, separated by a newline (b'\\n')
57+
character.
5758
"""
5859
encoded = binascii.b2a_base64(s, wrapcol=wrapcol, newline=False)
5960
if altchars is not None:
@@ -331,7 +332,8 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
331332
feature is not supported by the "standard" Adobe encoding.
332333
333334
If wrapcol is non-zero, the output will be represented in lines of
334-
no more than wrapcol characters each, separated by a newline character.
335+
no more than wrapcol characters each, separated by a newline (b'\\n')
336+
character.
335337
336338
pad controls whether the input is padded to a multiple of 4 before
337339
encoding. Note that the btoa implementation always pads.

0 commit comments

Comments
 (0)