mirror of
https://github.com/python/cpython.git
synced 2024-11-25 19:03:49 +08:00
Fix a straggler filter() call.
This commit is contained in:
parent
dd6d0247e9
commit
85ac28d788
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user