mirror of
https://github.com/python/cpython.git
synced 2025-07-27 05:04:15 +00:00
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
(cherry picked from commit cedd2473a9
)
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
This commit is contained in:
parent
7b5b429ada
commit
bdce188036
4 changed files with 8 additions and 13 deletions
|
@ -306,8 +306,7 @@ I/O Base Classes
|
||||||
|
|
||||||
.. class:: IOBase
|
.. class:: IOBase
|
||||||
|
|
||||||
The abstract base class for all I/O classes, acting on streams of bytes.
|
The abstract base class for all I/O classes.
|
||||||
There is no public constructor.
|
|
||||||
|
|
||||||
This class provides empty abstract implementations for many methods
|
This class provides empty abstract implementations for many methods
|
||||||
that derived classes can override selectively; the default
|
that derived classes can override selectively; the default
|
||||||
|
@ -461,8 +460,7 @@ I/O Base Classes
|
||||||
|
|
||||||
.. class:: RawIOBase
|
.. class:: RawIOBase
|
||||||
|
|
||||||
Base class for raw binary streams. It inherits :class:`IOBase`. There is no
|
Base class for raw binary streams. It inherits :class:`IOBase`.
|
||||||
public constructor.
|
|
||||||
|
|
||||||
Raw binary streams typically provide low-level access to an underlying OS
|
Raw binary streams typically provide low-level access to an underlying OS
|
||||||
device or API, and do not try to encapsulate it in high-level primitives
|
device or API, and do not try to encapsulate it in high-level primitives
|
||||||
|
@ -515,7 +513,7 @@ I/O Base Classes
|
||||||
.. class:: BufferedIOBase
|
.. class:: BufferedIOBase
|
||||||
|
|
||||||
Base class for binary streams that support some kind of buffering.
|
Base class for binary streams that support some kind of buffering.
|
||||||
It inherits :class:`IOBase`. There is no public constructor.
|
It inherits :class:`IOBase`.
|
||||||
|
|
||||||
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
|
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
|
||||||
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
|
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
|
||||||
|
@ -852,8 +850,7 @@ Text I/O
|
||||||
.. class:: TextIOBase
|
.. class:: TextIOBase
|
||||||
|
|
||||||
Base class for text streams. This class provides a character and line based
|
Base class for text streams. This class provides a character and line based
|
||||||
interface to stream I/O. It inherits :class:`IOBase`. There is no public
|
interface to stream I/O. It inherits :class:`IOBase`.
|
||||||
constructor.
|
|
||||||
|
|
||||||
:class:`TextIOBase` provides or overrides these data attributes and
|
:class:`TextIOBase` provides or overrides these data attributes and
|
||||||
methods in addition to those from :class:`IOBase`:
|
methods in addition to those from :class:`IOBase`:
|
||||||
|
|
|
@ -338,8 +338,7 @@ except AttributeError:
|
||||||
|
|
||||||
class IOBase(metaclass=abc.ABCMeta):
|
class IOBase(metaclass=abc.ABCMeta):
|
||||||
|
|
||||||
"""The abstract base class for all I/O classes, acting on streams of
|
"""The abstract base class for all I/O classes.
|
||||||
bytes. There is no public constructor.
|
|
||||||
|
|
||||||
This class provides dummy implementations for many methods that
|
This class provides dummy implementations for many methods that
|
||||||
derived classes can override selectively; the default implementations
|
derived classes can override selectively; the default implementations
|
||||||
|
@ -1845,7 +1844,7 @@ class TextIOBase(IOBase):
|
||||||
"""Base class for text I/O.
|
"""Base class for text I/O.
|
||||||
|
|
||||||
This class provides a character and line based interface to stream
|
This class provides a character and line based interface to stream
|
||||||
I/O. There is no public constructor.
|
I/O.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def read(self, size=-1):
|
def read(self, size=-1):
|
||||||
|
|
|
@ -34,8 +34,7 @@ typedef struct {
|
||||||
} iobase;
|
} iobase;
|
||||||
|
|
||||||
PyDoc_STRVAR(iobase_doc,
|
PyDoc_STRVAR(iobase_doc,
|
||||||
"The abstract base class for all I/O classes, acting on streams of\n"
|
"The abstract base class for all I/O classes.\n"
|
||||||
"bytes. There is no public constructor.\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"This class provides dummy implementations for many methods that\n"
|
"This class provides dummy implementations for many methods that\n"
|
||||||
"derived classes can override selectively; the default implementations\n"
|
"derived classes can override selectively; the default implementations\n"
|
||||||
|
|
|
@ -50,7 +50,7 @@ PyDoc_STRVAR(textiobase_doc,
|
||||||
"\n"
|
"\n"
|
||||||
"This class provides a character and line based interface to stream\n"
|
"This class provides a character and line based interface to stream\n"
|
||||||
"I/O. There is no readinto method because Python's character strings\n"
|
"I/O. There is no readinto method because Python's character strings\n"
|
||||||
"are immutable. There is no public constructor.\n"
|
"are immutable.\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue