Skip to content

Commit c9c6e04

Browse files
authored
Correct description of inheriting from another class (#114660)
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
1 parent e9dab65 commit c9c6e04

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

Doc/library/gzip.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The module defines the following items:
6161

6262
.. exception:: BadGzipFile
6363

64-
An exception raised for invalid gzip files. It inherits :exc:`OSError`.
64+
An exception raised for invalid gzip files. It inherits from :exc:`OSError`.
6565
:exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip
6666
files.
6767

@@ -287,4 +287,3 @@ Command line options
287287
.. option:: -h, --help
288288

289289
Show the help message.
290-

Doc/library/io.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ I/O Base Classes
466466

467467
.. class:: RawIOBase
468468

469-
Base class for raw binary streams. It inherits :class:`IOBase`.
469+
Base class for raw binary streams. It inherits from :class:`IOBase`.
470470

471471
Raw binary streams typically provide low-level access to an underlying OS
472472
device or API, and do not try to encapsulate it in high-level primitives
@@ -519,7 +519,7 @@ I/O Base Classes
519519
.. class:: BufferedIOBase
520520

521521
Base class for binary streams that support some kind of buffering.
522-
It inherits :class:`IOBase`.
522+
It inherits from :class:`IOBase`.
523523

524524
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
525525
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
@@ -633,7 +633,7 @@ Raw File I/O
633633
.. class:: FileIO(name, mode='r', closefd=True, opener=None)
634634

635635
A raw binary stream representing an OS-level file containing bytes data. It
636-
inherits :class:`RawIOBase`.
636+
inherits from :class:`RawIOBase`.
637637

638638
The *name* can be one of two things:
639639

@@ -696,7 +696,7 @@ than raw I/O does.
696696

697697
.. class:: BytesIO(initial_bytes=b'')
698698

699-
A binary stream using an in-memory bytes buffer. It inherits
699+
A binary stream using an in-memory bytes buffer. It inherits from
700700
:class:`BufferedIOBase`. The buffer is discarded when the
701701
:meth:`~IOBase.close` method is called.
702702

@@ -745,7 +745,7 @@ than raw I/O does.
745745
.. class:: BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)
746746

747747
A buffered binary stream providing higher-level access to a readable, non
748-
seekable :class:`RawIOBase` raw binary stream. It inherits
748+
seekable :class:`RawIOBase` raw binary stream. It inherits from
749749
:class:`BufferedIOBase`.
750750

751751
When reading data from this object, a larger amount of data may be
@@ -783,7 +783,7 @@ than raw I/O does.
783783
.. class:: BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE)
784784

785785
A buffered binary stream providing higher-level access to a writeable, non
786-
seekable :class:`RawIOBase` raw binary stream. It inherits
786+
seekable :class:`RawIOBase` raw binary stream. It inherits from
787787
:class:`BufferedIOBase`.
788788

789789
When writing to this object, data is normally placed into an internal
@@ -818,7 +818,7 @@ than raw I/O does.
818818
.. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)
819819

820820
A buffered binary stream providing higher-level access to a seekable
821-
:class:`RawIOBase` raw binary stream. It inherits :class:`BufferedReader`
821+
:class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader`
822822
and :class:`BufferedWriter`.
823823

824824
The constructor creates a reader and writer for a seekable raw stream, given
@@ -834,7 +834,7 @@ than raw I/O does.
834834

835835
A buffered binary stream providing higher-level access to two non seekable
836836
:class:`RawIOBase` raw binary streams---one readable, the other writeable.
837-
It inherits :class:`BufferedIOBase`.
837+
It inherits from :class:`BufferedIOBase`.
838838

839839
*reader* and *writer* are :class:`RawIOBase` objects that are readable and
840840
writeable respectively. If the *buffer_size* is omitted it defaults to
@@ -857,7 +857,7 @@ Text I/O
857857
.. class:: TextIOBase
858858

859859
Base class for text streams. This class provides a character and line based
860-
interface to stream I/O. It inherits :class:`IOBase`.
860+
interface to stream I/O. It inherits from :class:`IOBase`.
861861

862862
:class:`TextIOBase` provides or overrides these data attributes and
863863
methods in addition to those from :class:`IOBase`:
@@ -946,7 +946,7 @@ Text I/O
946946
line_buffering=False, write_through=False)
947947

948948
A buffered text stream providing higher-level access to a
949-
:class:`BufferedIOBase` buffered binary stream. It inherits
949+
:class:`BufferedIOBase` buffered binary stream. It inherits from
950950
:class:`TextIOBase`.
951951

952952
*encoding* gives the name of the encoding that the stream will be decoded or
@@ -1073,7 +1073,7 @@ Text I/O
10731073

10741074
.. class:: StringIO(initial_value='', newline='\n')
10751075

1076-
A text stream using an in-memory text buffer. It inherits
1076+
A text stream using an in-memory text buffer. It inherits from
10771077
:class:`TextIOBase`.
10781078

10791079
The text buffer is discarded when the :meth:`~IOBase.close` method is
@@ -1124,7 +1124,7 @@ Text I/O
11241124
.. class:: IncrementalNewlineDecoder
11251125

11261126
A helper codec that decodes newlines for :term:`universal newlines` mode.
1127-
It inherits :class:`codecs.IncrementalDecoder`.
1127+
It inherits from :class:`codecs.IncrementalDecoder`.
11281128

11291129

11301130
Performance

Doc/library/pickle.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -272,21 +272,21 @@ The :mod:`pickle` module defines three exceptions:
272272

273273
.. exception:: PickleError
274274

275-
Common base class for the other pickling exceptions. It inherits
275+
Common base class for the other pickling exceptions. It inherits from
276276
:exc:`Exception`.
277277

278278
.. exception:: PicklingError
279279

280280
Error raised when an unpicklable object is encountered by :class:`Pickler`.
281-
It inherits :exc:`PickleError`.
281+
It inherits from :exc:`PickleError`.
282282

283283
Refer to :ref:`pickle-picklable` to learn what kinds of objects can be
284284
pickled.
285285

286286
.. exception:: UnpicklingError
287287

288288
Error raised when there is a problem unpickling an object, such as a data
289-
corruption or a security violation. It inherits :exc:`PickleError`.
289+
corruption or a security violation. It inherits from :exc:`PickleError`.
290290

291291
Note that other exceptions may also be raised during unpickling, including
292292
(but not necessarily limited to) AttributeError, EOFError, ImportError, and

Doc/library/symtable.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Examining Symbol Tables
9797

9898
.. class:: Function
9999

100-
A namespace for a function or method. This class inherits
100+
A namespace for a function or method. This class inherits from
101101
:class:`SymbolTable`.
102102

103103
.. method:: get_parameters()
@@ -123,7 +123,7 @@ Examining Symbol Tables
123123

124124
.. class:: Class
125125

126-
A namespace of a class. This class inherits :class:`SymbolTable`.
126+
A namespace of a class. This class inherits from :class:`SymbolTable`.
127127

128128
.. method:: get_methods()
129129

0 commit comments

Comments
 (0)