You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
textwrap: wrapping a long word takes quadratic time #161977
textwrap.wrap() takes quadratic time on a single long word. TextWrapper._handle_long_word() breaks off one line's worth of the word at a time and stores the rest with reversed_chunks[-1] = chunk[end:], which copies the whole rest of the word for every output line.
Activity