mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
Replace file() with open()
This commit is contained in:
parent
2d726df26e
commit
7a4dbaf837
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ def checksyntax(self, filename):
|
|||
self.shell = shell = self.flist.open_shell()
|
||||
saved_stream = shell.get_warning_stream()
|
||||
shell.set_warning_stream(shell.stderr)
|
||||
f = file(filename, 'r')
|
||||
f = open(filename, 'r')
|
||||
source = f.read()
|
||||
f.close()
|
||||
if '\r' in source:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue