From: Raymond Hettinger Date: Tue, 4 Jun 2002 02:17:04 +0000 (+0000) Subject: Replace .keys() with .iteritems(). Second review and test by Alex. X-Git-Tag: v2.3c1~5496 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88f72ff95592730d3931d90028d0df934fa1a13d;p=python Replace .keys() with .iteritems(). Second review and test by Alex. --- diff --git a/Lib/mhlib.py b/Lib/mhlib.py index e5900acff9..e463c036b3 100644 --- a/Lib/mhlib.py +++ b/Lib/mhlib.py @@ -314,9 +314,9 @@ class Folder: """Write the set of sequences back to the folder.""" fullname = self.getsequencesfilename() f = None - for key in sequences.keys(): + for key, seq in sequences.iteritems(): s = IntSet('', ' ') - s.fromlist(sequences[key]) + s.fromlist(seq) if not f: f = open(fullname, 'w') f.write('%s: %s\n' % (key, s.tostring())) if not f: