summaryrefslogtreecommitdiff
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-02 18:55:56 +0000
committerRaymond Hettinger <python@rcn.com>2002-06-02 18:55:56 +0000
commit8a403845e8d0d77926d795926d74f02c5453a856 (patch)
tree84bf03d633212daaf7d8cddae6887ad8ede50191 /Lib/filecmp.py
parent48221dcb806c98622f5c78c8121af360a53b2c44 (diff)
downloadcpython-8a403845e8d0d77926d795926d74f02c5453a856.tar.gz
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 9aee1b389b..03c2ea3f5b 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):