Fix a straggler filter() call.

This commit is contained in:
Guido van Rossum 2007-09-25 21:48:09 +00:00
parent dd6d0247e9
commit 85ac28d788

View File

@ -388,7 +388,7 @@ def wrap_text(text, width):
text = text.expandtabs()
text = text.translate(WS_TRANS)
chunks = re.split(r'( +|-+)', text)
chunks = filter(None, chunks) # ' - ' results in empty strings
chunks = [ch for ch in chunks if ch] # ' - ' results in empty strings
lines = []
while chunks: