]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409)
authorPetr Viktorin <encukou@gmail.com>
Thu, 23 May 2024 22:11:45 +0000 (00:11 +0200)
committerGitHub <noreply@github.com>
Thu, 23 May 2024 22:11:45 +0000 (00:11 +0200)
Doc/library/base64.rst
Lib/base64.py

index cec9a6cef4bf7ddd6f35e96d818311121e122244..834ab2536e6c14e98e13f54dce750ae60382f114 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 25164d1a1df4fc8718e0cd19960c2c1dfb5d9aae..5a7e790a19338007a19886b095e5c0d8496f3b65 100755 (executable)
@@ -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.