From c48ebf8c67a83768ab094e9572f0fc69214450ba Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Sat, 11 Mar 2017 18:46:09 -0800 Subject: When iterating over dict.items(), we do not need a new list. --- bin/SConsDoc.py | 2 +- bin/SConsExamples.py | 4 ++-- bin/scons-proc.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index 2fe4f73e..d5666443 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -598,7 +598,7 @@ class SConsDocTree: # Create xpath context self.xpath_context = self.doc.xpathNewContext() # Register namespaces - for key, val in list(self.nsmap.items()): + for key, val in self.nsmap.items(): self.xpath_context.xpathRegisterNs(key, val) def __del__(self): diff --git a/bin/SConsExamples.py b/bin/SConsExamples.py index a86968d1..dd9bfaf8 100644 --- a/bin/SConsExamples.py +++ b/bin/SConsExamples.py @@ -267,7 +267,7 @@ def ensureExampleOutputsExist(dpath): os.mkdir(generated_examples) examples = readAllExampleInfos(dpath) - for key, value in list(examples.items()): + for key, value in examples.items(): # Process all scons_output tags for o in value.outputs: cpath = os.path.join(generated_examples, @@ -305,7 +305,7 @@ def createAllExampleOutputs(dpath): examples = readAllExampleInfos(dpath) total = len(examples) idx = 0 - for key, value in list(examples.items()): + for key, value in examples.items(): # Process all scons_output tags print("%.2f%s (%d/%d) %s" % (float(idx + 1) * 100.0 / float(total), perc, idx + 1, total, key)) diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 0747b2cc..e09c8538 100644 --- a/bin/scons-proc.py +++ b/bin/scons-proc.py @@ -104,7 +104,7 @@ Link_Entities_Header = """\ class SCons_XML(object): def __init__(self, entries, **kw): self.values = entries - for k, v in list(kw.items()): + for k, v in kw.items(): setattr(self, k, v) def fopen(self, name): -- cgit v1.2.1