diff options
Diffstat (limited to 'contrib/tools/python3/Lib/codecs.py')
| -rw-r--r-- | contrib/tools/python3/Lib/codecs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/tools/python3/Lib/codecs.py b/contrib/tools/python3/Lib/codecs.py index 82f23983e71..e4f4e1b5c02 100644 --- a/contrib/tools/python3/Lib/codecs.py +++ b/contrib/tools/python3/Lib/codecs.py @@ -111,6 +111,9 @@ class CodecInfo(tuple): (self.__class__.__module__, self.__class__.__qualname__, self.name, id(self)) + def __getnewargs__(self): + return tuple(self) + class Codec: """ Defines the interface for stateless encoders/decoders. @@ -615,7 +618,7 @@ class StreamReader(Codec): method and are included in the list entries. sizehint, if given, is ignored since there is no efficient - way to finding the true end-of-line. + way of finding the true end-of-line. """ data = self.read() @@ -706,13 +709,13 @@ class StreamReaderWriter: return self.reader.read(size) - def readline(self, size=None): + def readline(self, size=None, keepends=True): - return self.reader.readline(size) + return self.reader.readline(size, keepends) - def readlines(self, sizehint=None): + def readlines(self, sizehint=None, keepends=True): - return self.reader.readlines(sizehint) + return self.reader.readlines(sizehint, keepends) def __next__(self): |
