summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-01-03 21:06:46 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-01-03 21:06:46 (GMT)
commit8fa8972d80b767306ff56f8108859d40a97b6228 (patch)
treef30b5f8f81bc0a217025718ce2c6f39800a8bf9d /Lib
parent51cc72c6c01a40f14ab84bfaf918dca81631db15 (diff)
downloadcpython-8fa8972d80b767306ff56f8108859d40a97b6228.zip
cpython-8fa8972d80b767306ff56f8108859d40a97b6228.tar.gz
cpython-8fa8972d80b767306ff56f8108859d40a97b6228.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/mimetypes.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 1f2c9d6..ddd1fa4 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.