Closed
Closed
Marius-Juston
changed the title
gh-131789: textwrap.dedent by 4x for larger files, added only_whitespace option for non whitespace dedent
gh-131792: textwrap.dedent by 4x for larger files, added only_whitespace option for non whitespace dedent
Marius-Juston
changed the title
gh-131792: textwrap.dedent by 4x for larger files, added only_whitespace option for non whitespace dedent
gh-131791: textwrap.dedent by 4x for larger files, added only_whitespace option for non whitespace dedent
Comment on lines +456 to +459
| # If all lines are blank, normalize them | ||
| if not non_blank_whites: | ||
| # Preallocate result list | ||
| return "".join(["\n" if line.endswith("\n") else "" for line in lines]) |
Marius-Juston
changed the title
gh-131791: textwrap.dedent by 4x for larger files, added only_whitespace option for non whitespace dedent
gh-131791: Improve speed of textwrap.dedent by replacing re
Merged
Closed