R. David Murray added the comment:

This has already been fixed in issue 22687.  It was deemed a performance 
improvement for an edge case and was not backported.

I don't see the advantage of using textwrap to split up base64 encoded strings, 
by the way.  The module isn't designed for doing line splitting, it designed 
for doing text wrapping where blanks matter.  For your application I would just 
do:

   lines = [x[n*64:(n+1)*64] for n in range((len(x)//64)+1)]

----------
components:  -Benchmarks, Extension Modules, Regular Expressions
nosy: +r.david.murray
resolution:  -> duplicate
status: open -> closed
superseder:  -> horrible performance of textwrap.wrap() with a long word

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

Reply via email to