We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 850c07a commit 796fb3eCopy full SHA for 796fb3e
1 file changed
Lib/textwrap.py
@@ -439,11 +439,9 @@ def dedent(text):
439
non_blank_lines = [l for l in lines if l and not l.isspace()]
440
l1 = min(non_blank_lines)
441
l2 = max(non_blank_lines)
442
- margin = 0
443
- for i, c in enumerate(l1):
444
- if c != l2[i] or c not in ' \t':
+ for margin, c in enumerate(l1):
+ if c != l2[margin] or c not in ' \t':
445
break
446
- margin += 1
447
448
return '\n'.join([l[margin:] if l and not l.isspace() else ''
449
for l in lines])
0 commit comments