Antoine Pitrou added the comment:

Are you sure? I get the reverse results here (second patch):

Unpatched:
$ ./python -m timeit -s 'import textwrap; s = "abcde " * 10**4' -- 
'textwrap.wrap(s)'
10 loops, best of 3: 27 msec per loop

Patched:
$ ./python -m timeit -s 'import textwrap; s = "abcde " * 10**4' -- 
'textwrap.wrap(s)'
10 loops, best of 3: 19.2 msec per loop

> wordsep_re and wordsep_simple_re are public attributes and user code can 
> depend on this. Changing their is a way to customize TextWrapper.

With my second patch, that shouldn't be a problem.

----------

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

Reply via email to