mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Fix a straggler filter() call.
This commit is contained in:
parent
dd6d0247e9
commit
85ac28d788
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,7 @@ def wrap_text(text, width):
|
||||||
text = text.expandtabs()
|
text = text.expandtabs()
|
||||||
text = text.translate(WS_TRANS)
|
text = text.translate(WS_TRANS)
|
||||||
chunks = re.split(r'( +|-+)', text)
|
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 = []
|
lines = []
|
||||||
|
|
||||||
while chunks:
|
while chunks:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue