projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51cc72c
)
Remove a list comprehension, because a loop over the list
author
Walter Dörwald
<walter@livinglogic.de>
Fri, 3 Jan 2003 21:06:46 +0000
(21:06 +0000)
committer
Walter 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
patch
|
blob
|
history
diff --git
a/Lib/mimetypes.py
b/Lib/mimetypes.py
index 1f2c9d6a876e50ab85d928302878738f478df424..ddd1fa401257d74acbf72f93143741b4dcac42e1 100644
(file)
--- 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.