Anna Ravenscroft identified many occurrences of "file" used to open a file
in the stdlib and changed each of them to use "open" instead. At this
time there are no other known occurrences that can be safely changed (in
Lib and all subdirectories thereof).
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index ebcb8c5..a47afa4 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -333,11 +333,11 @@
f.close()
elif self.comp == "bz2":
f = bz2.BZ2Decompressor()
- s = file(self.dstname).read()
+ s = open(self.dstname).read()
s = f.decompress(s)
self.assertEqual(len(f.unused_data), 0, "trailing data")
else:
- f = file(self.dstname)
+ f = open(self.dstname)
s = f.read()
f.close()