1.1 --- a/lib/posix/io.py Mon Dec 12 23:33:28 2016 +0100
1.2 +++ b/lib/posix/io.py Tue Dec 13 00:58:52 2016 +0100
1.3 @@ -62,11 +62,14 @@
1.4
1.5 "A system-level stream object."
1.6
1.7 - def __init__(self, fd, mode="r", bufsize=1024):
1.8 + def __init__(self, fd, mode="r", encoding=None, bufsize=1024):
1.9
1.10 - "Initialise the stream with the given 'fd' and 'mode'."
1.11 + """
1.12 + Initialise the stream with the given 'fd', 'mode', 'encoding' and
1.13 + 'bufsize'.
1.14 + """
1.15
1.16 - get_using(filestream.__init__, self)(bufsize)
1.17 + get_using(filestream.__init__, self)(encoding, bufsize)
1.18 self.__data__ = fdopen(fd, mode)
1.19
1.20 # Standard streams.