Skip to content

Commit 311ac87

Browse files
committed
Further micro-optimisation suggested by Pieter Eendebak
1 parent ecc9cfc commit 311ac87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/textwrap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ def dedent(text):
443443
if c != l2[margin] or c not in ' \t':
444444
break
445445

446-
return '\n'.join([l[margin:] if l and not l.isspace() else ''
447-
for l in lines])
446+
return '\n'.join([l[margin:] if not l.isspace() else '' for l in lines])
448447

449448

450449
def indent(text, prefix, predicate=None):

0 commit comments

Comments
 (0)