[Python-checkins] r80371 - in python/branches/release31-maint: Lib/mailcap.py Misc/NEWS
antoine.pitrou
python-checkins at python.org
Thu Apr 22 15:56:42 CEST 2010
Author: antoine.pitrou
Date: Thu Apr 22 15:56:42 2010
New Revision: 80371
Log:
Merged revisions 80368-80369 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r80368 | antoine.pitrou | 2010-04-22 15:19:31 +0200 (jeu., 22 avril 2010) | 3 lines
Fix mailcap.py built-in test.
........
r80369 | antoine.pitrou | 2010-04-22 15:30:10 +0200 (jeu., 22 avril 2010) | 5 lines
Issue #8496: make mailcap.lookup() always return a list, rather than an iterator.
Patch by Gregory Nofi.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Lib/mailcap.py
python/branches/release31-maint/Misc/NEWS
Modified: python/branches/release31-maint/Lib/mailcap.py
==============================================================================
--- python/branches/release31-maint/Lib/mailcap.py (original)
+++ python/branches/release31-maint/Lib/mailcap.py Thu Apr 22 15:56:42 2010
@@ -164,7 +164,7 @@
if MIMEtype in caps:
entries = entries + caps[MIMEtype]
if key is not None:
- entries = filter(lambda e, key=key: key in e, entries)
+ entries = [e for e in entries if key in e]
return entries
def subst(field, MIMEtype, filename, plist=[]):
@@ -239,14 +239,12 @@
if not caps: caps = getcaps()
print("Mailcap entries:")
print()
- ckeys = caps.keys()
- ckeys.sort()
+ ckeys = sorted(caps)
for type in ckeys:
print(type)
entries = caps[type]
for e in entries:
- keys = e.keys()
- keys.sort()
+ keys = sorted(e)
for k in keys:
print(" %-15s" % k, e[k])
print()
Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS (original)
+++ python/branches/release31-maint/Misc/NEWS Thu Apr 22 15:56:42 2010
@@ -33,6 +33,9 @@
Library
-------
+- Issue #8496: make mailcap.lookup() always return a list, rather than an
+ iterator. Patch by Gregory Nofi.
+
- Issue #8195: Fix a crash in sqlite Connection.create_collation() if the
collation name contains a surrogate character.
More information about the Python-checkins
mailing list