mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
fileinput: replace this last occurence of codecs.open with builtins.open.
This commit is contained in:
parent
5252f9faee
commit
a011e2b2fa
2 changed files with 10 additions and 21 deletions
|
|
@ -398,9 +398,8 @@ def hook_compressed(filename, mode):
|
|||
|
||||
|
||||
def hook_encoded(encoding):
|
||||
import codecs
|
||||
def openhook(filename, mode):
|
||||
return codecs.open(filename, mode, encoding)
|
||||
return open(filename, mode, encoding=encoding)
|
||||
return openhook
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue