]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a straggler filter() call.
authorGuido van Rossum <guido@python.org>
Tue, 25 Sep 2007 21:48:09 +0000 (21:48 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 25 Sep 2007 21:48:09 +0000 (21:48 +0000)
Lib/distutils/fancy_getopt.py

index 15cbdd71622920e6e665d8077c308690645f0b6c..b3231c3de7604633254eb05842bd7a15fb1d37ed 100644 (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: