summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-28 14:55:37 (GMT)
committerGitHub <noreply@github.com>2024-05-28 14:55:37 (GMT)
commitcc8586a1edc0ec2844008827b59fd50da73e735c (patch)
tree4fae3fc48ede5c10225137176c04396110211492
parent47fb0f82cdd949b863e6e8dda13e38c62d6509cb (diff)
downloadcpython-cc8586a1edc0ec2844008827b59fd50da73e735c.zip
cpython-cc8586a1edc0ec2844008827b59fd50da73e735c.tar.gz
cpython-cc8586a1edc0ec2844008827b59fd50da73e735c.tar.bz2
[3.13] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (GH-119483)
Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (cherry picked from commit ffa24aab107b5bc3c6ad31a6a245c226bf24b208) Co-authored-by: Petr Viktorin <encukou@gmail.com>
-rw-r--r--Doc/library/base64.rst2
-rwxr-xr-xLib/base64.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst
index cec9a6c..834ab25 100644
--- a/Doc/library/base64.rst
+++ b/Doc/library/base64.rst
@@ -193,7 +193,7 @@ The modern interface provides:
*wrapcol* controls whether the output should have newline (``b'\n'``)
characters added to it. If this is non-zero, each output line will be
- at most this many characters long.
+ at most this many characters long, excluding the trailing newline.
*pad* controls whether the input is padded to a multiple of 4
before encoding. Note that the ``btoa`` implementation always pads.
diff --git a/Lib/base64.py b/Lib/base64.py
index 25164d1..5a7e790 100755
--- a/Lib/base64.py
+++ b/Lib/base64.py
@@ -332,7 +332,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
wrapcol controls whether the output should have newline (b'\\n') characters
added to it. If this is non-zero, each output line will be at most this
- many characters long.
+ many characters long, excluding the trailing newline.
pad controls whether the input is padded to a multiple of 4 before
encoding. Note that the btoa implementation always pads.