summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2006-08-24 02:58:11 (GMT)
committerAlex Martelli <aleaxit@gmail.com>2006-08-24 02:58:11 (GMT)
commit01c77c66289f8e9c8d15b8da623fae4014ec2edb (patch)
treef719c69719857899da42d2af8ceb48824cf4fe0d /Lib/test/test_descr.py
parentb5d47efe92fd12cde1de6a473108ef48238a43cc (diff)
downloadcpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.zip
cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.gz
cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.bz2
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).
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 3fb01e7..53054ad 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2338,7 +2338,7 @@ def inherits():
self.ateof = 1
return s
- f = file(name=TESTFN, mode='w')
+ f = open(name=TESTFN, mode='w')
lines = ['a\n', 'b\n', 'c\n']
try:
f.writelines(lines)
@@ -2394,7 +2394,7 @@ def restricted():
sandbox = rexec.RExec()
code1 = """f = open(%r, 'w')""" % TESTFN
- code2 = """f = file(%r, 'w')""" % TESTFN
+ code2 = """f = open(%r, 'w')""" % TESTFN
code3 = """\
f = open(%r)
t = type(f) # a sneaky way to get the file() constructor