Skip to content

Commit bc264ea

Browse files
scopfreakboy3742picnixz
authored
Docs: spelling and grammar fixes (#122084)
Corrected some grammar and spelling issues in documentation. Co-authored-by: Russell Keith-Magee <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 728432c commit bc264ea

22 files changed

+30
-30
lines changed

Doc/c-api/init_config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ PyConfig
509509
The :c:func:`PyConfig_Read` function only parses
510510
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
511511
is set to ``2`` after arguments are parsed. Since Python arguments are
512-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
512+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
513513
parse the application options as Python options.
514514
515515
:ref:`Preinitialize Python <c-preinit>` if needed.
@@ -1041,7 +1041,7 @@ PyConfig
10411041
The :c:func:`PyConfig_Read` function only parses
10421042
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
10431043
is set to ``2`` after arguments are parsed. Since Python arguments are
1044-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
1044+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
10451045
parse the application options as Python options.
10461046
10471047
Default: ``1`` in Python mode, ``0`` in isolated mode.

Doc/howto/free-threading-extensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Python's memory management C API provides functions in three different
188188
:ref:`allocation domains <allocator-domains>`: "raw", "mem", and "object".
189189
For thread-safety, the free-threaded build requires that only Python objects
190190
are allocated using the object domain, and that all Python object are
191-
allocated using that domain. This differes from the prior Python versions,
191+
allocated using that domain. This differs from the prior Python versions,
192192
where this was only a best practice and not a hard requirement.
193193

194194
.. note::

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
@@ -887,7 +887,7 @@ Statements
887887
.. class:: AnnAssign(target, annotation, value, simple)
888888

889889
An assignment with a type annotation. ``target`` is a single node and can
890-
be a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`.
890+
be a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`.
891891
``annotation`` is the annotation, such as a :class:`Constant` or :class:`Name`
892892
node. ``value`` is a single optional node.
893893

@@ -1979,7 +1979,7 @@ Function and class definitions
19791979
YieldFrom(value)
19801980

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

19841984
.. doctest::
19851985

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
@@ -1170,7 +1170,7 @@ Task Object
11701170
a :exc:`CancelledError` exception.
11711171

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

11751175
.. method:: exception()
11761176

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
@@ -92,7 +92,7 @@ another rational number, or from a string.
9292

9393
.. versionchanged:: 3.9
9494
The :func:`math.gcd` function is now used to normalize the *numerator*
95-
and *denominator*. :func:`math.gcd` always return a :class:`int` type.
95+
and *denominator*. :func:`math.gcd` always returns an :class:`int` type.
9696
Previously, the GCD type depended on *numerator* and *denominator*.
9797

9898
.. 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
@@ -457,7 +457,7 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
457457

458458
.. versionchanged:: 3.8
459459
Functions wrapped in :func:`functools.partial` now return ``True`` if the
460-
wrapped function is a :term:`asynchronous generator` function.
460+
wrapped function is an :term:`asynchronous generator` function.
461461

462462
.. versionchanged:: 3.13
463463
Functions wrapped in :func:`functools.partialmethod` now return ``True``
@@ -938,7 +938,7 @@ function.
938938

939939
.. attribute:: Parameter.kind.description
940940

941-
Describes a enum value of :attr:`Parameter.kind`.
941+
Describes an enum value of :attr:`Parameter.kind`.
942942

943943
.. versionadded:: 3.8
944944

Doc/library/mailbox.rst

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

13881388
.. method:: get_visible()
13891389

1390-
Return an :class:`Message` instance whose headers are the message's
1390+
Return a :class:`Message` instance whose headers are the message's
13911391
visible headers and whose body is empty.
13921392

13931393

Doc/library/optparse.rst

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

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

Doc/library/os.rst

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

15631563
.. function:: pwritev(fd, buffers, offset, flags=0, /)
15641564

1565-
Write the *buffers* contents to file descriptor *fd* at a offset *offset*,
1565+
Write the *buffers* contents to file descriptor *fd* at an offset *offset*,
15661566
leaving the file offset unchanged. *buffers* must be a sequence of
15671567
:term:`bytes-like objects <bytes-like object>`. Buffers are processed in
15681568
array order. Entire contents of the first buffer is written before
@@ -3805,7 +3805,7 @@ features:
38053805
new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
38063806

38073807
*initval* is the initial value of the event counter. The initial value
3808-
must be an 32 bit unsigned integer. Please note that the initial value is
3808+
must be a 32 bit unsigned integer. Please note that the initial value is
38093809
limited to a 32 bit unsigned int although the event counter is an unsigned
38103810
64 bit integer with a maximum value of 2\ :sup:`64`\ -\ 2.
38113811

@@ -3884,7 +3884,7 @@ features:
38843884

38853885
.. data:: EFD_SEMAPHORE
38863886

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

38903890
.. availability:: Linux >= 2.6.30

Doc/library/pathlib.rst

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

10171017
.. method:: Path.stat(*, follow_symlinks=True)
10181018

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

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

Doc/library/plistlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ This module defines the following functions:
117117
when a key of a dictionary is not a string, otherwise such keys are skipped.
118118

119119
When *aware_datetime* is true and any field with type ``datetime.datetime``
120-
is set as a :ref:`aware object <datetime-naive-aware>`, it will convert to
120+
is set as an :ref:`aware object <datetime-naive-aware>`, it will convert to
121121
UTC timezone before writing it.
122122

123123
A :exc:`TypeError` will be raised if the object is of an unsupported type or

Doc/library/ssl.rst

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

1745-
If there is an decoding error on the server name, the TLS connection will
1745+
If there is a decoding error on the server name, the TLS connection will
17461746
terminate with an :const:`ALERT_DESCRIPTION_INTERNAL_ERROR` fatal TLS
17471747
alert message to the client.
17481748

Doc/library/subprocess.rst

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

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

11311131
.. versionadded:: 3.7
11321132

Doc/library/urllib.request.rst

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

10931093
.. versionchanged:: 3.2
10941094
This method is applicable only for local hostnames. When a remote
1095-
hostname is given, an :exc:`~urllib.error.URLError` is raised.
1095+
hostname is given, a :exc:`~urllib.error.URLError` is raised.
10961096

10971097

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

11121112

11131113
.. _ftp-handler-objects:

Doc/using/ios.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ iOS version compatibility
3939
The minimum supported iOS version is specified at compile time, using the
4040
:option:`--host` option to ``configure``. By default, when compiled for iOS,
4141
Python will be compiled with a minimum supported iOS version of 13.0. To use a
42-
different miniumum iOS version, provide the version number as part of the
42+
different minimum iOS version, provide the version number as part of the
4343
:option:`!--host` argument - for example,
4444
``--host=arm64-apple-ios15.4-simulator`` would compile an ARM64 simulator build
4545
with a deployment target of 15.4.

0 commit comments

Comments
 (0)