Issue 17714: str.encode('base64') add trailing new line character. It is not documented. (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/61914

classification

Title: str.encode('base64') add trailing new line character. It is not documented.
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: alex.75, dmi.baranov, docs@python, ezio.melotti, python-dev
Priority: normal Keywords: patch

Created on 2013-04-13 15:39 by alex.75, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue17714.patch dmi.baranov,2013-04-29 20:00 review
Messages (5)
msg186734 - (view) Author: Alessandro Piccione (alex.75) Date: 2013-04-13 15:39
str.encode() with 'base64' as argument add a trailing new line character to the returned string. This is the difference from base64.b64encode(str) (that is used internally). This is not documented in str.encode() http://docs.python.org/2/library/stdtypes.html?highlight=encode#str.encode Instead it is perfectly documented for base64.encodestring() http://docs.python.org/2/library/base64.html#base64.encodestring
msg188091 - (view) Author: Dmi Baranov (dmi.baranov) * Date: 2013-04-29 20:00
Added a patch
msg188632 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-07 08:14
New changeset 8b764c3521fa by Ezio Melotti in branch '2.7': #17714: document that the base64 codec adds a trailing newline. http://hg.python.org/cpython/rev/8b764c3521fa
msg188633 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-05-07 08:16
The str.encode() doc is the wrong place where to document this, since the '\n' is added only for the base64 codec. I added a note about this in the codecs docs[0]. [0]: http://docs.python.org/2/library/codecs.html#standard-encodings
msg188634 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-07 08:21
New changeset cbb23e40e0d7 by Ezio Melotti in branch '3.3': #17714: document that the base64 codec adds a trailing newline. http://hg.python.org/cpython/rev/cbb23e40e0d7 New changeset b3e1be1493a5 by Ezio Melotti in branch 'default': #17714: merge with 3.3. http://hg.python.org/cpython/rev/b3e1be1493a5
History
Date User Action Args
2022-04-11 14:57:44 admin set github: 61914
2013-05-07 08:21:33 python-dev set messages: +
2013-05-07 08:16:56 ezio.melotti set status: open -> closedmessages: + assignee: docs@python -> ezio.melottiresolution: fixedstage: patch review -> resolved
2013-05-07 08:14:38 python-dev set nosy: + python-devmessages: +
2013-04-30 07:38:48 ezio.melotti set nosy: + ezio.melottitype: enhancementstage: needs patch -> patch review
2013-04-29 20:00:47 dmi.baranov set files: + issue17714.patchnosy: + dmi.baranovmessages: + keywords: + patch
2013-04-19 18:59:27 terry.reedy set assignee: docs@pythonnosy: + docs@pythoncomponents: + Documentationstage: needs patch
2013-04-13 15:39:53 alex.75 set title: str.encode('base64') add trailing new line character is not documented -> str.encode('base64') add trailing new line character. It is not documented.
2013-04-13 15:39:29 alex.75 create