Marius-Juston · GitHub

@Marius-Juston

… if desired

Closed

@Marius-Juston

Closed

@Marius-Juston

@Marius-Juston 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

Mar 27, 2025

@Marius-Juston 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

Mar 27, 2025

StanFromIreland

ZeroIntensity

StanFromIreland

StanFromIreland

eendebakpt

eendebakpt

eendebakpt

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])
… checking of common prefixes for each line
# Conflicts:
#	Lib/textwrap.py

@Marius-Juston

@Marius-Juston 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

Mar 28, 2025

picnixz

picnixz

@Marius-Juston

Merged

Closed

Read the original on github.com ↗