summaryrefslogtreecommitdiffstats
path: root/Lib/codecs.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-06-16 06:59:01 (GMT)
committerGitHub <noreply@github.com>2017-06-16 06:59:01 (GMT)
commit272d888c7b58aff5e1614e3b12e8198b92054835 (patch)
tree9514cfb06bace475f466f9c8222fb318e8966ee2 /Lib/codecs.py
parentfaa63d1e84b273f75d94fe6e66f67a13e4c97f5e (diff)
downloadcpython-272d888c7b58aff5e1614e3b12e8198b92054835.zip
cpython-272d888c7b58aff5e1614e3b12e8198b92054835.tar.gz
cpython-272d888c7b58aff5e1614e3b12e8198b92054835.tar.bz2
bpo-29783: Replace codecs.open() with io.open() (#599)
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r--Lib/codecs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 39ec845..44618cb 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -5,9 +5,10 @@ Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
-"""#"
+"""
-import builtins, sys
+import builtins
+import sys
### Registry and builtin stateless codec functions
@@ -739,7 +740,7 @@ class StreamReaderWriter:
"""
return getattr(self.stream, name)
- # these are needed to make "with codecs.open(...)" work properly
+ # these are needed to make "with StreamReaderWriter(...)" work properly
def __enter__(self):
return self