New submission from STINNER Victor:

The base64.b64encode() function calls binascii.b2a_base64() and then strips the 
newline. It would be more efficient to directly not add a newline.

Attached patch adds an optional newline parameter to binascii.b2a_base64(). It 
also modifies base64.b64encode() to call binascii.b2a_base64() with 
newline=False.

----------
files: binascii_b2a_base64_newline.patch
keywords: patch
messages: 252625
nosy: haypo
priority: normal
severity: normal
status: open
title: Add an optional newline parameter to binascii.b2a_base64() to not add a 
newline
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40731/binascii_b2a_base64_newline.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25357>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to