Replace instances of os.path.walk with os.walk
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py
index 6284f40..1094816 100644
--- a/Lib/test/test_repr.py
+++ b/Lib/test/test_repr.py
@@ -211,10 +211,6 @@
     fp.write(text)
     fp.close()
 
-def zap(actions, dirname, names):
-    for name in names:
-        actions.append(os.path.join(dirname, name))
-
 class LongReprTest(unittest.TestCase):
     def setUp(self):
         longname = 'areallylongpackageandmodulenametotestreprtruncation'
@@ -233,7 +229,9 @@
 
     def tearDown(self):
         actions = []
-        os.path.walk(self.pkgname, zap, actions)
+        for dirpath, dirnames, filenames in os.walk(self.pkgname):
+            for name in dirnames + filenames:
+                actions.append(os.path.join(dirpath, name))
         actions.append(self.pkgname)
         actions.sort()
         actions.reverse()