From 8fa8972d80b767306ff56f8108859d40a97b6228 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Walter=20D=C3=B6rwald?= Date: Fri, 3 Jan 2003 21:06:46 +0000 Subject: [PATCH] Remove a list comprehension, because a loop over the list is done afterwards anyway, so what the list comp does can be done in the loop. --- Lib/mimetypes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 1f2c9d6a87..ddd1fa4012 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -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. -- 2.40.0