Kaydet (Commit) 8fa8972d authored tarafından Walter Dörwald's avatar Walter Dörwald

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.
üst 51cc72c6
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment