From 7a901a2d3f4db8490b841c85e196dcabb0b34451 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Tue, 16 Mar 2010 16:54:02 +0100 Subject: [PATCH] Replace iter*() methods of dicts. --- patoolib/baker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patoolib/baker.py b/patoolib/baker.py index 39823d8..608423e 100644 --- a/patoolib/baker.py +++ b/patoolib/baker.py @@ -342,7 +342,7 @@ class Baker(object): # shortopts maps long option names to characters. To look up short # options, we need to create a reverse mapping. - shortchars = dict((v, k) for k, v in shortopts.iteritems()) + shortchars = dict((v, k) for k, v in shortopts.items()) # The *vargs list and **kwargs dict to build up from the command line # arguments @@ -515,7 +515,7 @@ class Baker(object): raise CommandError("Too many arguments to %s: %s" % (cmd.name, " ".join(args))) if not cmd.has_kwargs: - for k in sorted(kwargs.iterkeys()): + for k in sorted(kwargs.keys()): if k not in cmd.keywords: raise CommandError("Unknown option --%s" % k) @@ -560,7 +560,7 @@ class Baker(object): cmd, args, kwargs = self.parse(argv) result = "%s(%s" % (cmd.name, ",".join(repr(a) for a in args)) if kwargs: - kws = ",".join("%s=%r" % (k, v) for k, v in kwargs.iteritems()) + kws = ",".join("%s=%r" % (k, v) for k, v in kwargs.items()) result += "," + kws result += ")" return result