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

0 commit comments

Comments
 (0)