summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-02 18:55:56 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-02 18:55:56 (GMT)
commite0d4972acc8cfd4b8fb16c074a8031e50fab0f29 (patch)
treeb9a9286453c2ee4397618d4483679c3bc531f4b0 /Lib/filecmp.py
parent1fab9ee085755ed2f7abcf28794d7c20bd51a97a (diff)
downloadcpython-e0d4972acc8cfd4b8fb16c074a8031e50fab0f29.zip
cpython-e0d4972acc8cfd4b8fb16c074a8031e50fab0f29.tar.gz
cpython-e0d4972acc8cfd4b8fb16c074a8031e50fab0f29.tar.bz2
Replaced .keys() with dictionary iterators
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r--Lib/filecmp.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index 9aee1b3..03c2ea3 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -228,8 +228,8 @@ class dircmp:
def phase4_closure(self): # Recursively call phase4() on subdirectories
self.phase4()
- for x in self.subdirs.keys():
- self.subdirs[x].phase4_closure()
+ for sd in self.subdirs.itervalues():
+ sd.phase4_closure()
def report(self): # Print a report on the differences between a and b
# Output format is purposely lousy
@@ -258,15 +258,15 @@ class dircmp:
def report_partial_closure(self): # Print reports on self and on subdirs
self.report()
- for x in self.subdirs.keys():
+ for sd in self.subdirs.itervalues():
print
- self.subdirs[x].report()
+ sd.report()
def report_full_closure(self): # Report on self and subdirs recursively
self.report()
- for x in self.subdirs.keys():
+ for sd in self.subdirs.itervalues():
print
- self.subdirs[x].report_full_closure()
+ sd.report_full_closure()
def cmpfiles(a, b, common, shallow=1, use_statcache=0):