Skip to content

Commit 71970d6

Browse files
freakboy3742scoppicnixz
authored
[3.12] Docs: spelling and grammar fixes (GH-122084) (#122107)
(cherry picked from commit bc264ea) Co-authored-by: Ville Skyttä <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 9343c6d commit 71970d6

19 files changed

+27
-27
lines changed

Doc/c-api/init_config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ PyConfig
499499
The :c:func:`PyConfig_Read` function only parses
500500
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
501501
is set to ``2`` after arguments are parsed. Since Python arguments are
502-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
502+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
503503
parse the application options as Python options.
504504
505505
:ref:`Preinitialize Python <c-preinit>` if needed.
@@ -1000,7 +1000,7 @@ PyConfig
10001000
The :c:func:`PyConfig_Read` function only parses
10011001
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
10021002
is set to ``2`` after arguments are parsed. Since Python arguments are
1003-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
1003+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
10041004
parse the application options as Python options.
10051005
10061006
Default: ``1`` in Python mode, ``0`` in isolated mode.

Doc/howto/logging-cookbook.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4022,7 +4022,7 @@ As you can see, this output isn't ideal. That's because the underlying code
40224022
which writes to ``sys.stderr`` makes multiple writes, each of which results in a
40234023
separate logged line (for example, the last three lines above). To get around
40244024
this problem, you need to buffer things and only output log lines when newlines
4025-
are seen. Let's use a slghtly better implementation of ``LoggerWriter``:
4025+
are seen. Let's use a slightly better implementation of ``LoggerWriter``:
40264026

40274027
.. code-block:: python
40284028

Doc/library/ast.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ Statements
879879
.. class:: AnnAssign(target, annotation, value, simple)
880880

881881
An assignment with a type annotation. ``target`` is a single node and can
882-
be a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`.
882+
be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`.
883883
``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
884884
node. ``value`` is a single optional node.
885885

@@ -2002,7 +2002,7 @@ Function and class definitions
20022002
YieldFrom(value)
20032003

20042004
A ``yield`` or ``yield from`` expression. Because these are expressions, they
2005-
must be wrapped in a :class:`Expr` node if the value sent back is not used.
2005+
must be wrapped in an :class:`Expr` node if the value sent back is not used.
20062006

20072007
.. doctest::
20082008

Doc/library/asyncio-future.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,20 @@ Future Object
120120
a :exc:`CancelledError` exception.
121121

122122
If the Future's result isn't yet available, this method raises
123-
a :exc:`InvalidStateError` exception.
123+
an :exc:`InvalidStateError` exception.
124124

125125
.. method:: set_result(result)
126126

127127
Mark the Future as *done* and set its result.
128128

129-
Raises a :exc:`InvalidStateError` error if the Future is
129+
Raises an :exc:`InvalidStateError` error if the Future is
130130
already *done*.
131131

132132
.. method:: set_exception(exception)
133133

134134
Mark the Future as *done* and set an exception.
135135

136-
Raises a :exc:`InvalidStateError` error if the Future is
136+
Raises an :exc:`InvalidStateError` error if the Future is
137137
already *done*.
138138

139139
.. method:: done()

Doc/library/asyncio-task.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ Task Object
11041104
a :exc:`CancelledError` exception.
11051105

11061106
If the Task's result isn't yet available, this method raises
1107-
a :exc:`InvalidStateError` exception.
1107+
an :exc:`InvalidStateError` exception.
11081108

11091109
.. method:: exception()
11101110

Doc/library/contextlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Functions and classes provided:
322322

323323
.. versionchanged:: 3.12
324324
``suppress`` now supports suppressing exceptions raised as
325-
part of an :exc:`BaseExceptionGroup`.
325+
part of a :exc:`BaseExceptionGroup`.
326326

327327
.. function:: redirect_stdout(new_target)
328328

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Functions are accessed as attributes of dll objects::
107107

108108
Note that win32 system dlls like ``kernel32`` and ``user32`` often export ANSI
109109
as well as UNICODE versions of a function. The UNICODE version is exported with
110-
an ``W`` appended to the name, while the ANSI version is exported with an ``A``
110+
a ``W`` appended to the name, while the ANSI version is exported with an ``A``
111111
appended to the name. The win32 ``GetModuleHandle`` function, which returns a
112112
*module handle* for a given module name, has the following C prototype, and a
113113
macro is used to expose one of them as ``GetModuleHandle`` depending on whether

Doc/library/fractions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ another rational number, or from a string.
8787

8888
.. versionchanged:: 3.9
8989
The :func:`math.gcd` function is now used to normalize the *numerator*
90-
and *denominator*. :func:`math.gcd` always return a :class:`int` type.
90+
and *denominator*. :func:`math.gcd` always returns an :class:`int` type.
9191
Previously, the GCD type depended on *numerator* and *denominator*.
9292

9393
.. versionchanged:: 3.11

Doc/library/http.server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ provides three different variants:
378378

379379
If the request was mapped to a file, it is opened. Any :exc:`OSError`
380380
exception in opening the requested file is mapped to a ``404``,
381-
``'File not found'`` error. If there was a ``'If-Modified-Since'``
381+
``'File not found'`` error. If there was an ``'If-Modified-Since'``
382382
header in the request, and the file was not modified after this time,
383383
a ``304``, ``'Not Modified'`` response is sent. Otherwise, the content
384384
type is guessed by calling the :meth:`guess_type` method, which in turn

Doc/library/importlib.resources.abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
something like a data file that lives next to the ``__init__.py``
2323
file of the package. The purpose of this class is to help abstract
2424
out the accessing of such data files so that it does not matter if
25-
the package and its data file(s) are stored in a e.g. zip file
25+
the package and its data file(s) are stored e.g. in a zip file
2626
versus on the file system.
2727

2828
For any of methods of this class, a *resource* argument is

Doc/library/importlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ ABC hierarchy::
657657
something like a data file that lives next to the ``__init__.py``
658658
file of the package. The purpose of this class is to help abstract
659659
out the accessing of such data files so that it does not matter if
660-
the package and its data file(s) are stored in a e.g. zip file
660+
the package and its data file(s) are stored e.g. in a zip file
661661
versus on the file system.
662662

663663
For any of methods of this class, a *resource* argument is

Doc/library/inspect.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
450450

451451
.. versionchanged:: 3.8
452452
Functions wrapped in :func:`functools.partial` now return ``True`` if the
453-
wrapped function is a :term:`asynchronous generator` function.
453+
wrapped function is an :term:`asynchronous generator` function.
454454

455455

456456
.. function:: isasyncgen(object)
@@ -909,7 +909,7 @@ function.
909909

910910
.. attribute:: Parameter.kind.description
911911

912-
Describes a enum value of :attr:`Parameter.kind`.
912+
Describes an enum value of :attr:`Parameter.kind`.
913913

914914
.. versionadded:: 3.8
915915

Doc/library/mailbox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ When an :class:`!MHMessage` instance is created based upon a
12781278

12791279
.. method:: get_visible()
12801280

1281-
Return an :class:`Message` instance whose headers are the message's
1281+
Return a :class:`Message` instance whose headers are the message's
12821282
visible headers and whose body is empty.
12831283

12841284

Doc/library/optparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ The whole point of creating and populating an OptionParser is to call its
13511351
the list of arguments to process (default: ``sys.argv[1:]``)
13521352

13531353
``values``
1354-
an :class:`Values` object to store option arguments in (default: a
1354+
a :class:`Values` object to store option arguments in (default: a
13551355
new instance of :class:`Values`) -- if you give an existing object, the
13561356
option defaults will not be initialized on it
13571357

Doc/library/os.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
14971497

14981498
.. function:: pwritev(fd, buffers, offset, flags=0, /)
14991499

1500-
Write the *buffers* contents to file descriptor *fd* at a offset *offset*,
1500+
Write the *buffers* contents to file descriptor *fd* at an offset *offset*,
15011501
leaving the file offset unchanged. *buffers* must be a sequence of
15021502
:term:`bytes-like objects <bytes-like object>`. Buffers are processed in
15031503
array order. Entire contents of the first buffer is written before
@@ -3701,7 +3701,7 @@ features:
37013701
new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
37023702

37033703
*initval* is the initial value of the event counter. The initial value
3704-
must be an 32 bit unsigned integer. Please note that the initial value is
3704+
must be a 32 bit unsigned integer. Please note that the initial value is
37053705
limited to a 32 bit unsigned int although the event counter is an unsigned
37063706
64 bit integer with a maximum value of 2\ :sup:`64`\ -\ 2.
37073707

@@ -3780,7 +3780,7 @@ features:
37803780

37813781
.. data:: EFD_SEMAPHORE
37823782

3783-
Provide semaphore-like semantics for reads from a :func:`eventfd` file
3783+
Provide semaphore-like semantics for reads from an :func:`eventfd` file
37843784
descriptor. On read the internal counter is decremented by one.
37853785

37863786
.. availability:: Linux >= 2.6.30

Doc/library/pathlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ Querying file type and status
907907

908908
.. method:: Path.stat(*, follow_symlinks=True)
909909

910-
Return a :class:`os.stat_result` object containing information about this path, like :func:`os.stat`.
910+
Return an :class:`os.stat_result` object containing information about this path, like :func:`os.stat`.
911911
The result is looked up at each call to this method.
912912

913913
This method normally follows symlinks; to stat a symlink add the argument

Doc/library/ssl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ to speed up repeated connections from the same clients.
16971697
IDN-encoded internationalized domain name, the *server_name_callback*
16981698
receives a decoded U-label (``"pythön.org"``).
16991699

1700-
If there is an decoding error on the server name, the TLS connection will
1700+
If there is a decoding error on the server name, the TLS connection will
17011701
terminate with an :const:`ALERT_DESCRIPTION_INTERNAL_ERROR` fatal TLS
17021702
alert message to the client.
17031703

Doc/library/subprocess.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ The :mod:`subprocess` module exposes the following constants.
11101110
.. data:: NORMAL_PRIORITY_CLASS
11111111

11121112
A :class:`Popen` ``creationflags`` parameter to specify that a new process
1113-
will have an normal priority. (default)
1113+
will have a normal priority. (default)
11141114

11151115
.. versionadded:: 3.7
11161116

Doc/library/urllib.request.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ FileHandler Objects
11031103

11041104
.. versionchanged:: 3.2
11051105
This method is applicable only for local hostnames. When a remote
1106-
hostname is given, an :exc:`~urllib.error.URLError` is raised.
1106+
hostname is given, a :exc:`~urllib.error.URLError` is raised.
11071107

11081108

11091109
.. _data-handler-objects:
@@ -1118,7 +1118,7 @@ DataHandler Objects
11181118
ignores white spaces in base64 encoded data URLs so the URL may be wrapped
11191119
in whatever source file it comes from. But even though some browsers don't
11201120
mind about a missing padding at the end of a base64 encoded data URL, this
1121-
implementation will raise an :exc:`ValueError` in that case.
1121+
implementation will raise a :exc:`ValueError` in that case.
11221122

11231123

11241124
.. _ftp-handler-objects:

0 commit comments

Comments
 (0)