]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 May 2024 14:55:43 +0000 (16:55 +0200)
committerGitHub <noreply@github.com>
Tue, 28 May 2024 14:55:43 +0000 (16:55 +0200)
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>
Doc/library/base64.rst
Lib/base64.py

index 8d5d975714306256e4776b2ae92dab65a5e20795..9171e414a796010b6b90fea515fdfecd424a5e0a 100644 (file)
@@ -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.
index e233647ee76639abc96bebe161cd9095095beda6..846767a3d5a49ed5e63227e7a97faa31683a6b4c 100755 (executable)
@@ -334,7 +334,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.