mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
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).
This commit is contained in:
parent
b5d47efe92
commit
01c77c6628
17 changed files with 53 additions and 53 deletions
|
@ -152,7 +152,7 @@ class TestUnicodeFiles(unittest.TestCase):
|
|||
# top-level 'test' functions would be if they could take params
|
||||
def _test_single(self, filename):
|
||||
remove_if_exists(filename)
|
||||
f = file(filename, "w")
|
||||
f = open(filename, "w")
|
||||
f.close()
|
||||
try:
|
||||
self._do_single(filename)
|
||||
|
@ -170,7 +170,7 @@ class TestUnicodeFiles(unittest.TestCase):
|
|||
def _test_equivalent(self, filename1, filename2):
|
||||
remove_if_exists(filename1)
|
||||
self.failUnless(not os.path.exists(filename2))
|
||||
f = file(filename1, "w")
|
||||
f = open(filename1, "w")
|
||||
f.close()
|
||||
try:
|
||||
self._do_equivilent(filename1, filename2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue