This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, serhiy.storchaka, vstinner
Date 2015-10-05.16:17:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444061849.35.0.621229334835.issue25318@psf.upfronthosting.co.za>
In-reply-to
Content
My previous abandonned attempt was the issue #17742.

"Add _PyBytesWriter API to optimize Unicode encoders"

Oh, I forgot to mention and it may also be used to optimize bytes % args. More generally, any code generating a bytes object with an unknown length is advance. Said differently: _PyBytesWriter can be used when precomputing the output length is more expensive.

str % args now uses _PyUnicodeWriter but building an Unicode string is even more complex because of the different Unicode "kinds": 1, 2 or 4 bytes per character.
History
Date User Action Args
2015-10-05 16:17:29vstinnersetrecipients: + vstinner, ezio.melotti, serhiy.storchaka
2015-10-05 16:17:29vstinnersetmessageid: <1444061849.35.0.621229334835.issue25318@psf.upfronthosting.co.za>
2015-10-05 16:17:29vstinnerlinkissue25318 messages
2015-10-05 16:17:29vstinnercreate