Skip to content

Commit cedd247

Browse files
authored
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
1 parent d168c72 commit cedd247

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

Doc/library/io.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ I/O Base Classes
306306

307307
.. class:: IOBase
308308

309-
The abstract base class for all I/O classes, acting on streams of bytes.
310-
There is no public constructor.
309+
The abstract base class for all I/O classes.
311310

312311
This class provides empty abstract implementations for many methods
313312
that derived classes can override selectively; the default
@@ -461,8 +460,7 @@ I/O Base Classes
461460

462461
.. class:: RawIOBase
463462

464-
Base class for raw binary streams. It inherits :class:`IOBase`. There is no
465-
public constructor.
463+
Base class for raw binary streams. It inherits :class:`IOBase`.
466464

467465
Raw binary streams typically provide low-level access to an underlying OS
468466
device or API, and do not try to encapsulate it in high-level primitives
@@ -515,7 +513,7 @@ I/O Base Classes
515513
.. class:: BufferedIOBase
516514

517515
Base class for binary streams that support some kind of buffering.
518-
It inherits :class:`IOBase`. There is no public constructor.
516+
It inherits :class:`IOBase`.
519517

520518
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
521519
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
@@ -852,8 +850,7 @@ Text I/O
852850
.. class:: TextIOBase
853851

854852
Base class for text streams. This class provides a character and line based
855-
interface to stream I/O. It inherits :class:`IOBase`. There is no public
856-
constructor.
853+
interface to stream I/O. It inherits :class:`IOBase`.
857854

858855
:class:`TextIOBase` provides or overrides these data attributes and
859856
methods in addition to those from :class:`IOBase`:

Lib/_pyio.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ class UnsupportedOperation(OSError, ValueError):
326326

327327
class IOBase(metaclass=abc.ABCMeta):
328328

329-
"""The abstract base class for all I/O classes, acting on streams of
330-
bytes. There is no public constructor.
329+
"""The abstract base class for all I/O classes.
331330
332331
This class provides dummy implementations for many methods that
333332
derived classes can override selectively; the default implementations
@@ -1833,7 +1832,7 @@ class TextIOBase(IOBase):
18331832
"""Base class for text I/O.
18341833
18351834
This class provides a character and line based interface to stream
1836-
I/O. There is no public constructor.
1835+
I/O.
18371836
"""
18381837

18391838
def read(self, size=-1):

Modules/_io/iobase.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ typedef struct {
3434
} iobase;
3535

3636
PyDoc_STRVAR(iobase_doc,
37-
"The abstract base class for all I/O classes, acting on streams of\n"
38-
"bytes. There is no public constructor.\n"
37+
"The abstract base class for all I/O classes.\n"
3938
"\n"
4039
"This class provides dummy implementations for many methods that\n"
4140
"derived classes can override selectively; the default implementations\n"

Modules/_io/textio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PyDoc_STRVAR(textiobase_doc,
3030
"\n"
3131
"This class provides a character and line based interface to stream\n"
3232
"I/O. There is no readinto method because Python's character strings\n"
33-
"are immutable. There is no public constructor.\n"
33+
"are immutable.\n"
3434
);
3535

3636
static PyObject *

0 commit comments

Comments
 (0)