]> granicus.if.org Git - python/commitdiff
Remove a list comprehension, because a loop over the list
authorWalter Dörwald <walter@livinglogic.de>
Fri, 3 Jan 2003 21:06:46 +0000 (21:06 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Fri, 3 Jan 2003 21:06:46 +0000 (21:06 +0000)
is done afterwards anyway, so what the list comp does
can be done in the loop.

Lib/mimetypes.py

index 1f2c9d6a876e50ab85d928302878738f478df424..ddd1fa401257d74acbf72f93143741b4dcac42e1 100644 (file)
@@ -215,9 +215,8 @@ class MimeTypes:
             if not words:
                 continue
             type, suffixes = words[0], words[1:]
-            suffixes = [ '.' + suff for suff in suffixes ]
             for suff in suffixes:
-                self.add_type(type, suff, strict)
+                self.add_type(type, '.' + suff, strict)
 
 def guess_type(url, strict=True):
     """Guess the type of a file based on its URL.