From 85ac28d7880a35a95576dc81a87ba81eef1c4a1c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 25 Sep 2007 21:48:09 +0000 Subject: [PATCH] Fix a straggler filter() call. --- Lib/distutils/fancy_getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/distutils/fancy_getopt.py b/Lib/distutils/fancy_getopt.py index 15cbdd71622..b3231c3de76 100644 --- a/Lib/distutils/fancy_getopt.py +++ b/Lib/distutils/fancy_getopt.py @@ -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: