@@ -193,7 +193,7 @@ High-level Module Interface
193
193
.. versionadded :: 3.8
194
194
195
195
196
- .. function :: text_encoding(encoding, stacklevel=2)
196
+ .. function :: text_encoding(encoding, stacklevel=2, / )
197
197
198
198
This is a helper function for callables that use :func: `open ` or
199
199
:class: `TextIOWrapper ` and have an ``encoding=None `` parameter.
@@ -380,7 +380,7 @@ I/O Base Classes
380
380
Return ``True `` if the stream can be read from. If ``False ``, :meth: `read `
381
381
will raise :exc: `OSError `.
382
382
383
- .. method :: readline(size=-1)
383
+ .. method :: readline(size=-1, / )
384
384
385
385
Read and return one line from the stream. If *size * is specified, at
386
386
most *size * bytes will be read.
@@ -389,7 +389,7 @@ I/O Base Classes
389
389
the *newline * argument to :func: `open ` can be used to select the line
390
390
terminator(s) recognized.
391
391
392
- .. method :: readlines(hint=-1)
392
+ .. method :: readlines(hint=-1, / )
393
393
394
394
Read and return a list of lines from the stream. *hint * can be specified
395
395
to control the number of lines read: no more lines will be read if the
@@ -475,7 +475,7 @@ I/O Base Classes
475
475
:class: `RawIOBase ` provides these methods in addition to those from
476
476
:class: `IOBase `:
477
477
478
- .. method :: read(size=-1)
478
+ .. method :: read(size=-1, / )
479
479
480
480
Read up to *size * bytes from the object and return them. As a convenience,
481
481
if *size * is unspecified or -1, all bytes until EOF are returned.
@@ -585,7 +585,7 @@ I/O Base Classes
585
585
If *size * is ``-1 `` (the default), an arbitrary number of bytes are
586
586
returned (more than zero unless EOF is reached).
587
587
588
- .. method :: readinto(b)
588
+ .. method :: readinto(b, / )
589
589
590
590
Read bytes into a pre-allocated, writable
591
591
:term: `bytes-like object ` *b * and return the number of bytes read.
@@ -597,7 +597,7 @@ I/O Base Classes
597
597
A :exc: `BlockingIOError ` is raised if the underlying raw stream is in non
598
598
blocking-mode, and has no data available at the moment.
599
599
600
- .. method :: readinto1(b)
600
+ .. method :: readinto1(b, / )
601
601
602
602
Read bytes into a pre-allocated, writable
603
603
:term: `bytes-like object ` *b *, using at most one call to
@@ -727,7 +727,7 @@ than raw I/O does.
727
727
Return :class: `bytes ` containing the entire contents of the buffer.
728
728
729
729
730
- .. method :: read1([size])
730
+ .. method :: read1([size], / )
731
731
732
732
In :class: `BytesIO `, this is the same as :meth: `~BufferedIOBase.read `.
733
733
@@ -805,7 +805,7 @@ than raw I/O does.
805
805
Force bytes held in the buffer into the raw stream. A
806
806
:exc: `BlockingIOError ` should be raised if the raw stream blocks.
807
807
808
- .. method :: write(b)
808
+ .. method :: write(b, / )
809
809
810
810
Write the :term: `bytes-like object `, *b *, and return the
811
811
number of bytes written. When in non-blocking mode, a
@@ -828,7 +828,7 @@ than raw I/O does.
828
828
are guaranteed to be implemented.
829
829
830
830
831
- .. class :: BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE)
831
+ .. class :: BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE, / )
832
832
833
833
A buffered binary stream providing higher-level access to two non seekable
834
834
:class: `RawIOBase ` raw binary streams---one readable, the other writeable.
@@ -895,7 +895,7 @@ Text I/O
895
895
896
896
.. versionadded :: 3.1
897
897
898
- .. method :: read(size=-1)
898
+ .. method :: read(size=-1, / )
899
899
900
900
Read and return at most *size * characters from the stream as a single
901
901
:class: `str `. If *size * is negative or ``None ``, reads until EOF.
0 commit comments