mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #15204: Deprecated the 'U' mode in file-like objects.
This commit is contained in:
parent
d41c343f28
commit
6787a3806e
13 changed files with 45 additions and 13 deletions
|
@ -60,7 +60,7 @@ def fail(msg):
|
|||
# couldn't be opened
|
||||
def fopen(fname):
|
||||
try:
|
||||
return open(fname, 'U')
|
||||
return open(fname)
|
||||
except IOError as detail:
|
||||
return fail("couldn't open " + fname + ": " + str(detail))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue